CSS Hacks for Browsers

Now a days XHTML rules are following everybody so they will not get this problem. Here is the code which will work as a patch in your existing code. This code is about to those CSS class which need some changes according to browser, suppose IE 6 is showing good enough left margin but same thing is not visible in IE 7 untill you changed this CSS class according to IE 7, but again it will make a mess for IE 6. Through this code you will fix UI for both browsers. Let me write it now ..

// Below code will work for IE 6 and decendents
*html .[Your CSS Class Name]
{
[Your desired settings for IE 6]
}

// Below code will work only for IE 7
*:first-child+html .[Your CSS Class Name]
{
[Your desired settings for IE 7]
}

e.g.

*html .RightMargin

 padding-right:10px;
}
/*************** For IE 7 only *****************/
*:first-child+html .RightMargin

 padding-right:30px;
}

Yes ... now you can check this magic.

 

Ebook Download
View all
Learn
View all