Quantcast
Channel: Web Usability » web2usability
Viewing all articles
Browse latest Browse all 10

CSS Hacks for IE 7, IE 6, Opera, etc

$
0
0

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;
}


Posted in Usability Tagged: CSS, CSS Hacks

Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images