By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,302 Members | 1,788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,302 IT Pros & Developers. It's quick & easy.

Default top and bottom margin disappear in IE7: why

P: n/a
[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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.