Wednesday, February 2, 2011

CSS Hacks IE7 IE8 and Chrome

Firefox: Padding Top = 2 pixels
IE7 and IE8: Padding Top = 1 pixels
Chrome: Padding Top = 1 pixels

table.main td#infobox div#container > div#legend {
float: right;
padding-top: 2px;
padding-right: 3px;
*padding-top: 1px; /* IE7 hack*/
padding-top: 1px\0/; /* IE8 hack, this hack must go after the rules for all another browser */
}

/* Chrome hack for the preceding style */
@media screen and (-webkit-min-device-pixel-ratio:0) {
table.main td#infobox div#container > div#legend {
padding-top: 1px;
}
}

No comments: