Posts

Showing posts from February, 2010

CSS Hack for browsers -

Hi all, browser compatibility one of the most complicated issue we face during our development. So whenever i get into problem, go and search on internet. Here, I like to share Paul Irish.
/***** Selector Hacks ******/

/* IE6 and below */
* html #uno{color:red}

/* IE7 */
*:first-child+html #dos{color:red}

/* IE7, FF, Saf, Opera */
html>body #tres{color:red}

/* IE8, FF, Saf, Opera (Everything but IE 6,7) */
html>/**/body #cuatro{color:red}

/* Opera 9.27 and below, safari 2 */
html:first-child #cinco{color:red}

/* Safari 2-3 */
html[xmlns*=""] body:last-child #seis{color:red}

/* safari 3+, chrome 1+, opera9+, ff 3.5+ */
body:nth-of-type(1)#siete{color:red}

/* safari 3+, chrome 1+, opera9+, ff 3.5+ */
body:first-of-type #ocho{color:red}

/* saf3+, chrome1+ */
@media screen and (-webkit-min-device-pixel-ratio:0) {
#diez{color:red}
}

/* iPhone / mobile webkit */
@media screen and (max-device-width: 480px) {
#veintiseis{color:red}
}


/* Safari 2 - 3.1 */
html[xmlns*=""]:root #trece{color:red}