http://surlandia.com/2008/02/22/conditional-stylesheet-using-headlink-placeholder-zend-framework/
On 21/08/2008 18:22, "Nikos Dimopoulos" <nikos@niden.net> wrote:
Hello all,
I am trying to integrate the Blueprint CSS framework to my application using the appendStylesheet helper.
Blueprint needs the following:
<link rel='stylesheet' href='./css/blueprint/screen.css' type='text/css' media='screen, projection' />
<link rel='stylesheet' href='./css/blueprint/print.css' type='text/css' media='print' />
<!--[if IE]>
<link rel='stylesheet' href='./css/blueprint/ie.css' type='text/css' media='screen, projection' />
<![endif]-->
My code is as follows:
$url = $this->_view->baseUrl() . '/css/blueprint/screen.css';
$this->_view->headLink()->appendStylesheet($url , 'screen,projection');
$url = $this->_view->baseUrl() . '/css/blueprint/print.css';
$this->_view->headLink()->appendStylesheet($url , 'print');
This handles the first two lines of the blueprint css requirements.
How can I add a conditional comments for the IE stylesheet? Is there a way to add the <!--[if IE]> and <![endif]-->?
Thanks!
Nikos
没有评论:
发表评论