473,378 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 4875
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Jukka K. Korpela | last post by:
I just noticed that most browsers render <table border="1"><tr><td><p>foo</p></td></tr></table> the same way as <table border="1"><tr><td>foo</td></tr></table> That is, they ignore the p...
5
by: Aaron | last post by:
I have a div with an image which needs to appear in it's bottom left. I currently have the padding top of the image set to 100%, which should move the image to the bottom of the the div, but for...
14
by: Xah Lee | last post by:
is there somewhere i can find the default css for browsers? e.g. what's the usual rendering in terms of css for <p>, <ul> etc. in particular, right now i'm interested in creating a style...
26
by: meltedown | last post by:
I have 2 left floating divs on a page. Sometime the left side is larger, sometimes the right side is larger. I want the page to have a margin at the bottom of whichever div is the largest. If I...
1
by: Edward | last post by:
I created a simple CSS layout (code and example below) for bloggin/writing but ran into five issues that I need help with: 1. How do I get rid of the right-margin red line on the last three...
0
by: GTalbot | last post by:
Hello fellow stylesheet colleagues, Load this url: http://www.gtalbot.org/BrowserBugsSection/DefaultTopBottomMarginsForPargDisappear.html I would appreciate it if someone could explain 1-...
6
by: John Dann | last post by:
Don't know whether anyone might be willing to take a look at a little CSS problem that's stumping me. There's a page fragment at: http://www.weatherstations.co.uk/default_test.htm and the item...
7
by: GTalbot | last post by:
Hello fellow authoring.stylesheets colleagues, Can someone please explain why the bottom margin of the last inflow block-level child in an overflowed parent should not have its margin reachable....
1
by: runway27 | last post by:
i am having a serious issue with ie 7 i really need help. i am using a center layout using 900px the center layout looks and works fine in all browsers except for ie7 i have used a border for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.