Im my web page there is a div with width 0 which has a left and right border of 1px width each.
In Firefox when I give the following code it holds the div with 50px width, but it happens to be 48px wide in IE7.
<div style="width: 48px; border: #a9a9a9 1px solid; height: 30px;">test div</div>
Can anyone help me resolving this issue?
Thanks in advance.
Looks like IE box model bug. If in Quirks mode, IE subtracts border, padding, marginfrom element width. See the diagram below:
If you declare correct DOCTYPE for your HTML, this problem should go away.