4/06/2009
Div Layout:Width,Padding
For those beginners for building div, non table html structure. We will easily get some errors on the padding and width setting.
The main problems is caused of our 2 main browsers: Firefox and IE. They read div width and padding in a totally different way.
In Firefox side, if you build a 600px width and 20px paddding div. You will get 640px width inside the div.
But in IE side. If you make a same condition. You finally will get 600px width inside the div. But the div will extend to 560px.
I will not go on discuss which side is right and wrong. Cause of IE 6 and firefox still are main browser in the internet. That is no sense which we igonre one of it.
I suggested you to make one div for controlling the padding. Although this is a stupid setting.
<div style="width:600px">
<div style="padding:20px">
Your contents here
</div>
</div>
But it would be easy and fastest way for solving those 2 different browsers problems.
Those problems are not only appear at div. Some of table td setting may be crashed too.
Article:i-web-design|web design
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment