I agree with conditional CSS. I started using is a few years ago and
have found nothing that is better.

Add in your main CSS first that covers everything, and the CSS works
for say Firefox. Then add in a IE6 and IE7 CSS that only includes the
changes you need to the main CSS (i.e. no need to have a full CSS for
each browser).

This is the code:-

<link href="/styles/stylesheet.css" rel="stylesheet" type="text/css" /
>

<!--[if IE 6]>
<link href="/styles/stylesheet_ie6.css" rel="stylesheet" type="text/
css" />
<![endif]-->

<!--[if gte IE 7]>
<link href="/styles/stylesheet_ie7.css" rel="stylesheet" type="text/
css" />
<![endif]-->

then you have 3 stylesheets:-
stylesheet.css
stylesheet_ie6.css
stylesheet_ie7.css

Also, due to IE8 now rendering different to IE7 (sigh) which is
different to IE6 (sigh), instead of creating a IE8 stylesheet you can
add the following code at the top of all your wbesites (so still more
work :( ) to tell IE8 to render like IE7. This is quicker than making
your website work for IE8 if it already works for IE7.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

Also, in the conditional statements you can add IE6 specific files,
for example, I also put a javascript file in the conditional statement
for IE6 that I only need for IE6 (to make PNG files work for IE6).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to