![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I don't believe you. I just tested this on IE 7, and there was no such effect. |
#2
| |||
| |||
|
|
Jukka K. Korpela wrote: I don't believe you. I just tested this on IE 7, and there was no such effect. I don't believe him either. I tested it with IE6, IE7, Firefox 2, Netscape 8 and Opera 9. |
|
Mind you, there's *something* causing the space at the top of the page; I'm fairly certain that I've seen pages where it was absent, with the first line of text on the page hard up against the top edge of the container. |
#3
| |||
| |||
|
|
Without the Strict DTD, it will be in Quirks Mode and applying margin:0; to body, the <P>aragraph will be hard up against the top of the viewport. |
#4
| |||
| |||
|
|
Scripsit Gus Richter: Without the Strict DTD, it will be in Quirks Mode and applying margin:0; to body, the <P>aragraph will be hard up against the top of the viewport. This is part of the oddities of Quirks Mode in Firefox and actually documented, in a fairly obscure way, at http://lxr.mozilla.org/seamonkey/sou...tyle/quirk.css Firefox and relatives suppress the top margin of several elements in certain contexts. Perhaps the easiest to observe is the case where a <p element appears as the first element in a <td> element, especially if you use borders for the table cell so that the effect is easy to see. It also happens for <p> at the start of <body>, though this is a somewhat strange case. (Why would you start a page with a paragraph of text and not with a heading or with a block containing a logo, links, etc.?) This is definitely not something general in browsers. Specifically, IE suppresses the top margin of a <p> at the start of a <td>, but it does that in both modes (Quirks and Standards). There's no logic in Firefox in this issue. There is nothing quirky in browsers' "traditional" behavior, and there was no need to change it in the standards mode. It's just a matter of browser defaults, describable in terms of a browser style sheet. If a browser vendor wishes to change such defaults, he should think twice, and surely shouldn't masquerade it as a "standards" issue. It's just as mad as it would be to start using Arial as default font in standards mode and keep using Times New Roman in quirks mode. |
#5
| |||
| |||
|
|
Scripsit Gus Richter: Without the Strict DTD, it will be in Quirks Mode and applying margin:0; to body, the <P>aragraph will be hard up against the top of the viewport. This is part of the oddities of Quirks Mode in Firefox and actually documented, in a fairly obscure way, at http://lxr.mozilla.org/seamonkey/sou...tyle/quirk.css Firefox and relatives suppress the top margin of several elements in certain contexts. Perhaps the easiest to observe is the case where a <p element appears as the first element in a <td> element, especially if you use borders for the table cell so that the effect is easy to see. It also happens for <p> at the start of <body>, though this is a somewhat strange case. (Why would you start a page with a paragraph of text and not with a heading or with a block containing a logo, links, etc.?) This is definitely not something general in browsers. Specifically, IE suppresses the top margin of a <p> at the start of a <td>, but it does that in both modes (Quirks and Standards). |
|
There's no logic in Firefox in this issue. There is nothing quirky in browsers' "traditional" behavior, and there was no need to change it in the standards mode. It's just a matter of browser defaults, describable in terms of a browser style sheet. |
|
If a browser vendor wishes to change such defaults, he should think twice, and surely shouldn't masquerade it as a "standards" issue. It's just as mad as it would be to start using Arial as default font in standards mode and keep using Times New Roman in quirks mode. |
#6
| |||
| |||
|
|
When there is anonymous text, all browsers are without top margin in either Quirks or Standards Mode, |
|
which is the same when <p>aragraph is used in Quirks Mode. |
|
IE is the odd man out only in Standards Mode where it applies no top margin to <p>aragraph. |
#7
| ||||
| ||||
|
|
Firefox has invented non-standard pseudoselectors ":-moz-first-node" and ":-moz-last-node" to implement this, because what it consists of is outside the CSS specification. |
|
There's no way to get that behaviour just with default styles using only a CSS 2.1 conforming implementation. That makes it a quirk and a standards issue. |
|
As for browsers' "traditional" behaviour, I'm not sure whether IE's unusual behaviour is an accidental bug or a non-conformance to W3C specifications because they had something else in mind. |
|
If a browser vendor wishes to change such defaults, he should think twice, and surely shouldn't masquerade it as a "standards" issue. It's just as mad as it would be to start using Arial as default font in standards mode and keep using Times New Roman in quirks mode. |
#8
| |||
| |||
|
|
Scripsit Gus Richter: [ Fullquote - always a useful signal. ] When there is anonymous text, all browsers are without top margin in either Quirks or Standards Mode, You mean loose text, right? That is, text data directly inside <body>. It has no margins. Big surprise. |
|
There's nothing illogical in suppressing the top margin of a <p> element that opens the content of <body>. It can easily be described as body > p:first-child { margin-top: 0; } And there was no reason to drop that behavior |
#9
| ||||||
| ||||||
|
|
Scripsit Ben C: Firefox has invented non-standard pseudoselectors ":-moz-first-node" and ":-moz-last-node" to implement this, because what it consists of is outside the CSS specification. It's not clear what you mean by "this" |
|
, but several of the cases discussed _are_ describable in CSS 2.1 terms. |
|
There's no way to get that behaviour just with default styles using only a CSS 2.1 conforming implementation. That makes it a quirk and a standards issue. Even if that were the case, it has nothing to do with the question whether a document contains a particular doctype string or not. That's a markup issue, quite external to all CSS considerations. Besides, the HTML specifications do not specify the default rendering of documents, and they do not require that the default rendering be describable in CSS 2.1 (since HTML is independent of the very existence of CSS) or that it be described at all. |
|
As for browsers' "traditional" behaviour, I'm not sure whether IE's unusual behaviour is an accidental bug or a non-conformance to W3C specifications because they had something else in mind. What non-conformance? |
|
A browser may display <p> elements with pink background on Sundays, and you still cannot claim that it is non-conforming because of that. |
|
If a browser vendor wishes to change such defaults, he should think twice, and surely shouldn't masquerade it as a "standards" issue. It's just as mad as it would be to start using Arial as default font in standards mode and keep using Times New Roman in quirks mode. I guess you quoted that, without commenting on it, because you realized, ultimately, that I was right and this paragraph summarized my point well. Thank you. |
#10
| |||||
| |||||
|
|
Scripsit Gus Richter: [ Fullquote - always a useful signal. ] |
|
When there is anonymous text, all browsers are without top margin in either Quirks or Standards Mode, You mean loose text, right? That is, text data directly inside <body>. It has no margins. Big surprise. |
|
which is the same when <p>aragraph is used in Quirks Mode. You're just messing things up, really. |
|
IE is the odd man out only in Standards Mode where it applies no top margin to <p>aragraph. More confusion. |
|
[Clipped OT material (causing confusion)] |
![]() |
| Thread Tools | |
| Display Modes | |
| |