Wednesday 8 February 2012

Default paddings and margins

HTML Tags such as table, th, td, h1, h2 etc. are having default paddings and margins, which will create unexpected spacing in some places. for avoiding them we have to add the following lines in to the style like,



 H4 {
   padding: 0;
   margin: 0;
 }

if you want the action to be done for a part only, do as follows


.mytable, .mytable td {
   width: 742px;
   padding: 0;
   margin: 0;
 }

where my table is a class defined.

No comments:

Post a Comment