Great Articles For Your Everyday CSS Fix

by rams007 on Mar.05, 2009, under Developer Blog

Great Articles For Your Everyday CSS Fix
————————————————————————
I hesitate sharing these hacks, because most beginners have tendencies to want to hack everything up, which leads to a nightmare in the long run. I have come a cross a few of them which I would like to share, but please use them wisely. With good XHTML/CSS structure, hacks are not needed. If all else fails, go ahead and check some of the options below.
IE Conditional Tags

<!--[if IE ]>
  <link href="iecss.css" rel="stylesheet" type="text/css">
<![endif]-->

IE 6 Hack
*html .classname {}

IE 6 ‘!important’ Hack
.classname {
float: left;
margin: 200px !important; /*–The !important; hack tells IE6 to skip this line.–*/
margin: 220px;
}

IE 7 Hack
*+html .classname {}

Safari Hack
html:lang(en)>body .classname {}

Opera 7 Hack
@media all and (min-width: 0px){
.classname {}
}

Google Chrome Hack
body:nth-of-type(1) p{
   color: #333333;
}

Ramkumar B
Bangalore

Leave a Comment :, more...

Welcome to D’Signz Co

by admin on Feb.10, 2009, under Developer Blog

Hi All

Welcome to DSignz Co Blog, we are here to post web development matters

Leave a Comment more...