You can test this it works for me :
In your <head> of the main template file
I choose to make another file for IE6 for this project. Maybe you can
change it to match your need.
<?php //all other browser than IE6 (pay attention : IE7 is described
as " Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.1; SV1)" )?>
<?php if (!preg_match('/^Mozilla\/4\.0 \(compatible\; MSIE 6/', $this-
>getContext()->getRequest()->getHttpHeader('User-Agent')) ) { echo
stylesheet_tag('main'); }; ?>
<!--[if lte IE 6]>
<?php echo stylesheet_tag('main_ie6') ?>
<![endif]-->
I know that you can also inside a CSS file make some conditional stuff
with tricks but I cannot tell you how :(
Stéphane
On 16 déc, 23:54, "Sid Bachtiar" <[email protected]> wrote:
> Hi,
>
> I'm working on a Symfony 1.0 project and needing to add an IE6 hack
> CSS as the last CSS but need to add code to only include the CSS if
> the browser is IE6. How can I do that?
>
> I added the code just above </head> in layout.php but it still would
> not show up after other CSS files. Other CSS files always come last.
>
> Cheers,
>
> Sid
> --
> Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---