Thursday 7 January 2010

Padding issue in firefox

Problem : There is a problem the way the div elements with padding displayed in firefox and IE.

Solution :

Mozilla supports its own variation of this declaration:

-moz-box-sizing: border-box;
-moz-box-sizing: content-box;
-moz-box-sizing: padding-box;

IE8 uses a similar variation:

-ms-box-sizing: border-box
-ms-box-sizing: content-box;

.panel {
-moz-box-sizing:border-box;
box-sizing:border-box;
width:153px !important; /*moz width*/
width:151px; /*IE width*/
}