Forum Moderators: not2easy
In IE6/Win, Opera, Mozilla, it views ok. But when I view it in IE5/Win, then the padding-border seems to have no value at all. I tried to solve it with a spacer DIV, but that didn't work. I know IE5/Win has problems with inline elements, so I made the A-selector for links a block-level element. But it still doesn't work.
Can anyone shine some light to this dark IE/Win problem.
div.subhead {
margin: 0;
padding: 0;
background-repeat: repeat;
background-image: url('../images/bg_nav.gif');
border-top: 3px solid #000;
border-right: 1px solid #000;
border-left: 1px solid #000;
border-bottom: 1px solid #000;
}
div.subhead_content {
padding: 6px 12px;
}
a.nav {
margin: 0;
padding: 0;
border: 1px solid #000;
display: block;
font-weight: bold;
color: #339;
text-decoration: underline;
}
<div class="subhead">
<div class="subhead_content">
<a href="test.html" class="nav">CD</a>
<a href="test.html" class="nav">DVD</a>
</div>
</div>
If I use the following code, then the problem doesn't occur:
<div class="subhead">
<div class="subhead_content">
<a href="test.html" class="nav">CD</a>
</div>
</div>
The general style for a fix is using the IE parsing bug.
checkout: [tantek.com...]
asp
Don't use quotes in url('image') - its optional in the CSS spec and I've heard it causes problems for some browsers.
Consider using more shorthand CSS..
e.g.
background-repeat: repeat;
background-image: url('../images/bg_nav.gif');
border-top: 3px solid #000;
border-right: 1px solid #000;
border-left: 1px solid #000;
border-bottom: 1px solid #000;
could be written as
background: url(../images/bg_nav.gif) repeat;
border: 1px solid #000;
border-top-width: 3px;
There! No real help at all, but at least your code is smaller :)
Suzy
[edited by: SuzyUK at 12:58 pm (utc) on May 8, 2003]