Quantcast
Channel: birghtyoursite » css
Viewing all articles
Browse latest Browse all 8

css hacks for chrome firefox ie6 ie7 ie8

$
0
0

When coding cross-browsers css xhtml layout,sometimes we may meet some pain css problem and cost much time . Fortunately, there are some css hacks for us :

/*---google chrome hack---*/
 
 @media screen and (-webkit-min-device-pixel-ratio:0) {
   /*----css codes for google chrome------
   #sboxes li h2 
    {
      font-size:17px;
     padding-left:7px; 
      }
*/
}

sometimes , only ie6 have layout problems ,so i aways use quick ie6 hack,add a &quote;_&quote;to the css, for instance:

  #content
  {
      padding:10px;
    _padding:5px;/* --- for ie6 css ----  */
  }

those above 2 hack is most used.There are some other css hacks:

css hack for ie7 :

*+html selector { property: value; }

this hack can pass w3c validation!

css for ie6,ie7,ie8

* html selector { property: value; }

this hack also can pass w3c validation!

css hack for only ie8

property: value\0

Viewing all articles
Browse latest Browse all 8

Trending Articles