There are all kind of CSS hacks regarding IE6 and IE7 over the Internet. What provoke me to write a note about it was a problem that I explored and couldn't easily find the solution.
In general the two major hacks for these two versions of Internet Explorer are * html (for IE 6) and *+html (for IE7). But the second hack depends on the mode, that browser was loaded - your page should be at Standards mode if you want it to work.
For understanding in what mode is particular browser loading your page, please read Activating Browser Modes with Doctype.
CSS code below is going to work fine, if you have problems with both IE6 and IE7 and your page is loaded at Standards mode.
/* All browsers */
.yourClassName {
/* code goes here */
}
/* Fix styles to IE6 in both modes and IE7 in quirks mode */
* html .yourClassName {
/* code goes here */
}
/* Fix IE7 Only in Standards mode */
*+html .yourClassName {
/* code goes here */
}
category: CSS, posted date: 16.02.2008, Comment Add your comment here.
What is this blog about? - A blog about sharing wisdoms mostly connected with web development.
I truly hope that you will find something useful here. Cheers, Raya.