views:

92

answers:

1

Using the Zend Framework, I have a menu and want to put it throughout the application so that I put it in the master layout. I want to decorate the menu so I add a CSS as follow:

  echo $this->headScript()        
            ->appendFile($this->baseUrl().'/css/layout.css');

In CSS it just have the following:

root { 
    display: block;
}

But when testing, Firebug warn an error:

missing ; before statement
 root { \n

I checked the BOM error but it's no problem. All other CSS attached in the view script is work fine.

How can I solve this problem?

+2  A: 

Would assume it's because you're using $this->headScript() so it's being evaluated as JavaScript rather than CSS! You should be using:

$this->headLink()->appendStylesheet($this->baseUrl().'/css/layout.css');
Will Prescott
Greate, it work well after I revised as your instruction.Thank you
Thang Nguyen