margin-bottom not consistant with browsers

margin-bottom not consistant with browsers

am 04.08.2007 02:05:04 von Alice

I've got a div with a bottom margin of 12px. In IE7, the margin is in
fact 12 px, but in Firefox, it's 30 px. Can someone tell me what's
going on here and what I can do about it? I'm pretty sure it's not an
issue along the lines of "Firefox adds 18 px to all bottom margins",
so what type of issue is this?

Re: margin-bottom not consistant with browsers

am 04.08.2007 02:22:24 von dorayme

In article
<1186185904.972588.312590@x40g2000prg.googlegroups.com>,
alice wrote:

> I've got a div with a bottom margin of 12px. ...
> in Firefox, it's 30 px.

I'd like to see that!

--
dorayme

Re: margin-bottom not consistant with browsers

am 04.08.2007 04:19:48 von Neredbojias

Well bust mah britches and call me cheeky, on Sat, 04 Aug 2007 00:05:04 GMT
alice scribed:

> I've got a div with a bottom margin of 12px. In IE7, the margin is in
> fact 12 px, but in Firefox, it's 30 px. Can someone tell me what's
> going on here and what I can do about it? I'm pretty sure it's not an
> issue along the lines of "Firefox adds 18 px to all bottom margins",
> so what type of issue is this?

Probably an extra LF/CR from some source or t'other. Look for
s, esp.
at end or beginning of containers and how text flows therewithin.

--
Neredbojias
Half lies are worth twice as much as whole lies.

Re: margin-bottom not consistant with browsers

am 04.08.2007 10:21:33 von Ben C

On 2007-08-04, alice wrote:
> I've got a div with a bottom margin of 12px. In IE7, the margin is in
> fact 12 px, but in Firefox, it's 30 px. Can someone tell me what's
> going on here and what I can do about it? I'm pretty sure it's not an
> issue along the lines of "Firefox adds 18 px to all bottom margins",
> so what type of issue is this?

Could be margin-collapsing, which IE7 might get wrong (it is a little
complicated to understand). What kind of bottom margin does the div's
container have, and does the container also have zero bottom padding and
border?

This would give the effect you describe for example:




Hello


world


You shouldn't be able to see any red, and there should be 30px between
the bottom of "Hello" and the top of "world".