Sent by Holly Bergevin on 5 January 2005 11:11
From: "Stephanie Bridges" [EMAIL-REMOVED]>
>> My problem is that there is a rather large gap between the bottom of the
>> tabs div and the top of the table div in IE and Opera.
>In case anyone is interested, I finally found a way to make the problem go
>away that didn't involve browser hacks. I added
>
>* { margin: 0; padding: 0; }
>
>to the beginning of my CSS and the problem went away.
>
>I had created a couple of test pages to try to track down the problem --
>first one I created I put all the styles inline. Adding the above as the
>first line snugged the div following the tabs up to the bottom of the tab
>div until I styled a <p> with a bottom margin. If I set a bottom *padding*
>however on the <p>'s, everything looks fine in IE and Opera.
>For a test page (CSS is in header) see
>http://www.econ.iastate.edu/testing/tabtest1.htm.
>Is this something that is known about IE and I just didn't know how to go
>about finding it or is it something new?
Well, it's not new, but it's not really well known, either. Below is a small exerpt from an article
by Zoe Gillenwater over at communitymx.com -
"... in Internet Explorer for Windows or Opera, you will notice that the space between the bottom
of the list and the top of the next paragraph [the table, in your case] is much wider than in
Firefox. This is due to a bug that both browsers share. They take the bottom margin from the block
preceding the float [your paragraph, as you discovered] and apply it to the top of the block
following the float as well [that table]. Explicitly zeroing out the margin on the block following
the float does no good – the gap still appears."
The basic fix in your case, as you found, is to zero the bottom margin of the paragraph that comes
before your (floated) list. Any of the ways you've discovered should be fine. Pick your
favorite...
hth,
~holly
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/