adding css to single page
Permalink
Hi,
I have created a single dashboard page, I want to add css to it but have tried
$this->addHeaderItem($html->css('mystyle.css', 'css')); in both the view and the page.
How can I add (in the header) a css file?
Where should I put the css file?
If the error "Call to a member function css() on a non-object" happening because it cannot find the css file or because the method call is illegal?
I do not want to edit core themes header but add the css later.
I have created a single dashboard page, I want to add css to it but have tried
$this->addHeaderItem($html->css('mystyle.css', 'css')); in both the view and the page.
How can I add (in the header) a css file?
Where should I put the css file?
If the error "Call to a member function css() on a non-object" happening because it cannot find the css file or because the method call is illegal?
I do not want to edit core themes header but add the css later.
Alternatively, you could build it into the single page for your theme using a similar line to those used in the header element of the theme. But it would need to be before the <body> tag, so the feasibility of doing this depends on how your theme is structured.