One doubt:
I give float:left for the div and put another block element such as h3 inside the div. Then it gives padding top and bottom. If i remove float: left it wont give padding.
html
<div class="one"><h3>Test with Float</h3></div>
<div class="clear"> </div>
<div class="two"><h3>Test without Float</h3></div>
css
.one{
background: grey;
float:left;
width: 100%;
}
.two{
background: #DAD5C1;
width: 100%;
}
.clear{
clear: both;
}