<div id="hello">
<ul>
<li>Hello</li>
<li>Hello</li>
</ul>
</div>
And css for the above html
#hello{
margin:0px;
padding:0px;
border:1px solid black;
float:left;
}
#hello ul{
position:relative;
display: inline-block;
list-style:none;
margin:0px;
padding:0px;
}
#hello li{
float:left;
}
For the above html and css, I always get a additional 5px margin for the ul element.
After meticulously going though each css statements line by line from my code and writing the above example, I was able to find that the problem was due to
display:inline-block;
or
display:inline-table;
What is proper way to over come this?
some other forums suggest to use
"Set font-size: 0; for parent container and font-size: your_size; for children."
Is there any other solution to prevent this so that my font size of 0 doesn't cascade down to children.
Thank you Srikanth