Forum Moderators: not2easy
I have the following:
<div id="block1">
<div class="wrapper">
<h3>Foo</h3>
<div>...</div>
</div>
</div>
I have a background image applied to the <h3> aligned on the top. This *should* be the top edge of the .wrapper, which should be the top edge of #block1. But instead I see a small bit of the background color of wrapper showing through on the top. If I remove the wrapper div, I still see the block1 background color showing.
My h3 has margin: 0. I tried giving it a border-top: 1px solid black, and that doesn't show up. But if I make it 2px, I can see 1px of the border.
The fix I'm using at the moment is to assign the following style to my h3:
margin-top: -1px;
And hide this from other browsers. It also has position: relative; to fix other IE bugs (grrrr), which is also hidden from other browsers.
This has to be a common bug, so what's the best fix? Surely what I'm doing can't be the best solution.