Mywebdunia's Blog

Posts Tagged ‘css rules

CSS hack the name itself says hiding something from someone, that is hiding CSS Rules from specific Web Browser.

Some example of CSS hack..

.container{

font-family: Verdana,Arial;

font-size:11px;

padding-top:5px;

}

If you are using the above container class and  you want there shouldn’t be any padding-top in IE then the following code would do for you..

.container{

font-family: Verdana,Arial;

font-size:11px;

padding-top:5px;

*padding-top:5px; //hides from IE

}

The * indicates the browser to hide that attribute and you get the result.


Categories