Kim Malo wrote:
> I'm adding slightly rounded corners at the top and bottom of the central
> (content) div on a site.
>
> Since there's a repeating image (vertical only) background in the div, I set
> it up using the method where you put an extra wrapper div around the
> content, so you can insert non-repeating images (with the rounded corners)
> bracketing the content div.
>
> In IE there was a gap between the top rounded corner image and the beginning
> of the content div background. After browsing around some of the list
> archives I tried an idea from a "sometimes I do this when nothing else
> works" post (mine didn't happen on the bottom, so not just standard IE
> alternate box issue) and put  <br /> after the top image with the rounded
> corners.
>
> Which worked its magic and the gap disappeared.
>
> My question is why? Why is that necessary and what exactly is it doing that
> eliminated the gap?

Your top rounded corners image is an inline element, which means it 
reserves space within it's bounds at the bottom for descenders 
(typographic term for the dangly bit in letters like p, j, q).  The 
solution is to make your image a block element and zero out it's 
margin/padding ( example:  img {display:block;margin:0;padding:0;} ).

I'm not sure why a line-break fixed it in IE, but with the above 
solution you won't need it.

-- 
----------------//
Shawn Lawler
Research and Training Center on Community Living
Institute on Community Integration
University of Minnesota

______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to