IE5 and IE5.5 compatibility
filters/hacks
A few modifications are necessary to improve the menu1 with IE 5 and IE 5.5:
We still need two stylesheets:
pagecss2nn4.css with the rules that are ignored or correctly interpreted.
pagecss2.css with the new rules and what generates display problems.
We will add a few hacks.
<link rel="stylesheet" href="pagecss2nn4.css" type="text/css" /> <style type="text/css"> <!-- /*<![CDATA[*/ /*is ignored by nn4 or ie4*/ @import "pagecss2.css";/*overwrites previously defined styles*/ /*hacks to add here or in pagecss2nn4*/ #menugauche li{ margin-top:0; border-bottom:0; border-top:1px solid #90BADE; margin-bottom:-5px; border-bottom/*hide from IE5.0/Win from here*/:1px solid #90BADE; margin-bottom:-1px; } /*3 solutions to fix the menu width*/ /*solution 1*/ #menugauche li a{ width:155px; w\idth:135px;/*hide from IE5,IE5.5/Win and Konqueror ->3.2 !*/ } html>body #menugauche li a{ width:135px;/*Konqueror fix*/ } /*solution 2: we redefine the rule for MSIE*/ * html #menugauche li a{ width:155px;/*or width:100%;*/ w\idth:135px;/*only supported by MSIE 6*/ } /* solution 3 conditional comments */ /*]]>*/ --> </style>
There will be no change for other browsers.
Only CSS, no table and no javascript.
The number of MSIE 5 and MSIE5.5 users is decreasing, but it is high enough to test your pages.
MSIE 7 may bring surprises as it should read html > body, body > element, head:first-child + body and stop interpreting * html.
If it becomes real, using conditional comments for the differents versions of MSIE will become the wisest solution.
1 CSS cutting edge proposes other cross-browser solutions without lists for vertical and horizontal menus.
1 Other solutions for horizontal and vertical menus.