Home » CSS » ! HAPPY CSS HACK !

! HAPPY CSS HACK !

CSS HACK, USE IF NEEDED

.page {
color: green; /*Firefox, Safari, Chrome*/
*color: black; /*IE7only*/
_color: gray; /*IE6only*/
}

.page {
color: yellow/IE8+9;  /*IE8+9*/
}

:root .page {
color:pink /IE9;  /*IE9-only*/
}

/* Safari, Chrome*/
@media screen and (-webkit-min-device-pixel-ratio:0) {
.page {
color: green;
}
}

/* Safari, Chrome*/
/*
body:first-of-type .page {
color: green;

}

body:nth-of-type(1) .page {
color: red;
}
*/

/*
html:lang(en)>body .page {
color: red;
}*/

@media screen and (max-device-width: 480px) {
.page {
color: cyan; /* iPhone / mobile webkit */
}
}

CHECK NOW!

<h1>! HAPPY CSS HACK !</h1>
<div>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>

for more: http://paulirish.com/2009/browser-specific-css-hacks/

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s