Last Comment Bug 190743 - [MARGIN-C] A vertical gap is inserted before a header div if a <h1> element is placed in a subsequent div using CSS & XHTML strict
: [MARGIN-C] A vertical gap is inserted before a header div if a <h1> element ...
Status: RESOLVED FIXED
[patch]
: testcase
Product: Core
Classification: Components
Component: Layout: Block and Inline (show other bugs)
: Trunk
: All All
: P2 minor (vote)
: mozilla1.5beta
Assigned To: David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch)
: Hixie (not reading bugmail)
Mentors:
http://users.bigpond.net.au/steven.bu...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-26 19:24 PST by Steven Butler
Modified: 2003-07-21 23:15 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Testcase (325 bytes, text/html)
2003-07-18 11:42 PDT, Mats Palmgren (vacation)
no flags Details
patch (1.58 KB, patch)
2003-07-18 15:34 PDT, David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch)
bzbarsky: review+
bzbarsky: superreview+
Details | Diff | Splinter Review

Description Steven Butler 2003-01-26 19:24:34 PST
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3b) Gecko/20030125
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3b) Gecko/20030125

The URL above is a static copy of a dynamic login page.  It has a gap at the top
that goes away when the <h1>Login</h1> is removed from a content div which is
contained in a nested div.  The page is designed like this:
Header div: Img float left                   Img float right
Menu div : floated left
Content div which contains h1 element
Footer div

I noticed this problem in Phoenix 0.5 (on win2k), Mozilla 1.3a(win98) and
Mozilla nightly 1.3.0.200301250 (win98).  It does not happen in Mozilla 1.0
(linux, win98).

Another page: 
http://users.bigpond.net.au/steven.butler/
has no <h1> tag, and does not suffer the problem (all other layout is identical to 
http://users.bigpond.net.au/steven.butler/login.html
(the linked URL).

Reproducible: Always

Steps to Reproduce:
1. Goto URL http://users.bigpond.net.au/steven.butler/login.html


Actual Results:  
Mozilla draws unwanted gap at the top of the page


Expected Results:  
Mozilla should display the header div directly underneath the top of the drawing
window, with no gaps.
Comment 1 Boris Zbarsky [:bz] 2003-01-26 20:14:39 PST
Hmm... looks like the top margin of the <h1> gets totally misplaced (turning it
off removes the space).
Comment 2 Steven Butler 2003-01-26 21:25:29 PST
The top margin of the <h1> is applied before the top div, as well as to the 
<h1> itself.
Comment 3 Mats Palmgren (vacation) 2003-07-18 11:42:52 PDT
Created attachment 128023 [details]
Testcase
Comment 4 Mats Palmgren (vacation) 2003-07-18 11:46:19 PDT
Note: this only occurs when there is a specified "border-top-width: 0px;" on
the _empty_ DIV.
Comment 5 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2003-07-18 15:34:16 PDT
Created attachment 128038 [details] [diff] [review]
patch
Comment 6 Boris Zbarsky [:bz] 2003-07-18 15:51:04 PDT
Comment on attachment 128038 [details] [diff] [review]
patch

Doh.  r+sr=bzbarsky
Comment 7 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2003-07-18 15:52:42 PDT
Taking.
Comment 8 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2003-07-21 23:15:09 PDT
Fix checked in to trunk, 2003-07-21 23:13:45 -0700.

Note You need to log in before you can comment on or make changes to this bug.