468,555 Members | 2,117 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,555 developers. It's quick & easy.

Default top and bottom margin disappear in IE7: why

[followup-to set to comp.infosystems.www.authoring.html]
Hello fellow HTML and markup coder colleagues,

Please visit this url:

http://www.gtalbot.org/BrowserBugsSe...Disappear.html

I would appreciate it if someone could explain

1- why MSIE 7 render this simple webpage so differently from Firefox
2.0.0.9, Opera 9.50, Safari 3.0.3?

2- If this is due to a bug in MSIE7? If so, which one?

3- When querying the currentStyle of margin-top and margin-bottom of
#OrdinaryPargLime with IE developer toolbar or by querying with
currentStyle.marginTop, the value returned is "auto". When creating a
nested <pwith margin declaratively set to auto inside a div with
Parent-Floated-Yellow-Div class, then the top margin and bottom margin
suddenly occur in MSIE7 but are removed in other browsers (Firefox
2.0.0.9, Opera 9.50, Safari 3.0.3).

What I am trying to say is this: in MSIE 7, the current style values
of margin-top and margin-bottom for #OrdinaryPargLime and for
#OrdinaryPargWithMarginAutoOrange are the exactly the same: auto but
even for MSIE 7, those 2 paragraphs' vertical margins are rendered
very differently.

4- In MSIE 7, paragraphs have default margins. Why are they removed
(at least not visible, not rendered) for #OrdinaryPargLime ?

Best regards,

Gérard
[followup-to set to comp.infosystems.www.authoring.html]

Nov 10 '07 #1
2 4725
On 2007-11-10, GTalbot <ne*******@gtalbot.orgwrote:
[followup-to set to comp.infosystems.www.authoring.html]
Hello fellow HTML and markup coder colleagues,

Please visit this url:

http://www.gtalbot.org/BrowserBugsSe...Disappear.html

I would appreciate it if someone could explain

1- why MSIE 7 render this simple webpage so differently from Firefox
2.0.0.9, Opera 9.50, Safari 3.0.3?

2- If this is due to a bug in MSIE7? If so, which one?
Clearly it is a bug. OrdinaryPargLime should have <p>'s default margins
(usually 1.12em top and bottom, but that's up to the browser), and
OrdinaryPargWithMarginAutoOrange should have no margins because you set
them to auto.

CSS 2.1 10.6.3:

If 'margin-top', or 'margin-bottom' are 'auto', their used value is
0.
3- When querying the currentStyle of margin-top and margin-bottom of
#OrdinaryPargLime with IE developer toolbar or by querying with
currentStyle.marginTop, the value returned is "auto".
So far so good. If the default really is auto, it should render as it
has done-- with no margins.

The first test (OrdinaryPargLime) can be considered "passed but
suspicous"-- because we know really that <pis supposed to have some
default margins.
When creating a nested <pwith margin declaratively set to auto
inside a div with Parent-Floated-Yellow-Div class, then the top margin
and bottom margin suddenly occur in MSIE7 but are removed in other
browsers (Firefox 2.0.0.9, Opera 9.50, Safari 3.0.3).
As they should be.
What I am trying to say is this: in MSIE 7, the current style values
of margin-top and margin-bottom for #OrdinaryPargLime and for
#OrdinaryPargWithMarginAutoOrange are the exactly the same: auto but
even for MSIE 7, those 2 paragraphs' vertical margins are rendered
very differently.
It looks like MSIE7 is very confused.
4- In MSIE 7, paragraphs have default margins. Why are they removed
(at least not visible, not rendered) for #OrdinaryPargLime ?
Who knows? Perhaps it's applying the selector to the wrong <p>. If you
delete the second paragraph altogether perhaps the first one sorts
itself out?
Nov 10 '07 #2
On 10 nov, 05:27, Ben C <spams...@spam.eggswrote:
On 2007-11-10, GTalbot <newsgr...@gtalbot.orgwrote:
[followup-to set to comp.infosystems.www.authoring.html]
Hello fellow HTML and markup coder colleagues,
Please visit this url:
http://www.gtalbot.org/BrowserBugsSe...tomMarginsForP...
I would appreciate it if someone could explain
1- why MSIE 7 render this simple webpage so differently from Firefox
2.0.0.9, Opera 9.50, Safari 3.0.3?
2- If this is due to a bug in MSIE7? If so, which one?

Clearly it is a bug. OrdinaryPargLime should have <p>'s default margins
(usually 1.12em top and bottom, but that's up to the browser), and
OrdinaryPargWithMarginAutoOrange should have no margins because you set
them to auto.

CSS 2.1 10.6.3:

If 'margin-top', or 'margin-bottom' are 'auto', their used value is
0.
[snipped]

I have filed 2 distinct bug report/testcases for this:

http://www.gtalbot.org/BrowserBugsSe...arginAuto.html

http://www.gtalbot.org/BrowserBugsSe...Disappear.html

All other browsers (except IE) pass these 2 tests.

Regards, Gérard

Nov 10 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Jukka K. Korpela | last post: by
5 posts views Thread by Aaron | last post: by
14 posts views Thread by Xah Lee | last post: by
26 posts views Thread by meltedown | last post: by
reply views Thread by GTalbot | last post: by
6 posts views Thread by John Dann | last post: by
1 post views Thread by runway27 | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.