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 "e;_"e;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 |