How can I prevent the left padding from being lost in IE7 (IE8 compatibility mode) in the following example once the element jumps to the next line down?
A:
The fix is the following: Add 10px to the wrap and 2px to the margin-left.
.wrap
{
width: 210px;
}
.elm
{
background-color: #333;
color: #fff;
line-height: 30px;
font-weight: bold;
padding: 3px 4px;
margin: 2px 2px 2px 2px;
white-space: nowrap;
}
Erik
2010-08-08 23:44:31
Thanks for your reply but this does not work as it does fix this when the length of the element is variable. See the page now to see what I mean.
aherrick
2010-08-09 00:21:46