Feeds:
Posts
Comments

Posts Tagged ‘CSS Hacks’

W3C Validation’ Category

The following CSS selectors are considered workarounds and hacks for specific web browsers.
IE 6 and below
* html {}
IE 7 and below
*:first-child+html {} * html {}
IE 7 only
*:first-child+html {}
IE 7 and modern browsers only
html>body {}
Modern browsers only (not IE 7)
html>/**/body {}
Recent Opera versions 9 and below
html:first-child {}
How to Apply Hacks
If you want to add 10px; padding to a div element called #rightpanel specifically for IE 7, then you can use the following hack:
*:first-child+html #rightpanel {
padding: 10px;
}

want to apply the padding just for IE 6, then its as following way:
* html #rightpanel {
padding: 10px;
}

Advertisements

Read Full Post »