0

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?

1

1 Answer 1

2

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');
Sign up to request clarification or add additional context in comments.

1 Comment

Greate, it work well after I revised as your instruction. Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.