[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

RESOLVED FIXED in mozilla1.5beta

Status

()

Core
Layout: Block and Inline
P2
minor
RESOLVED FIXED
15 years ago
14 years ago

People

(Reporter: Steven Butler, Assigned: dbaron)

Tracking

({testcase})

Trunk
mozilla1.5beta
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [patch], URL)

Attachments

(2 attachments)

(Reporter)

Description

15 years ago
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.
Hmm... looks like the top margin of the <h1> gets totally misplaced (turning it
off removes the space).
Assignee: other → block-and-inline
Status: UNCONFIRMED → NEW
Component: Layout → Layout: Block & Inline
Ever confirmed: true
OS: Windows 98 → All
Hardware: PC → All
Summary: A vertical gap is inserted before a header div if a <h1> element is placed in a subsequent div using CSS & XHTML strict → A vertical gap is inserted before a header div if a <h1> element is placed in a subsequent div using CSS & XHTML strict
(Reporter)

Comment 2

15 years ago
The top margin of the <h1> is applied before the top div, as well as to the 
<h1> itself.

Comment 3

14 years ago
Created attachment 128023 [details]
Testcase

Comment 4

14 years ago
Note: this only occurs when there is a specified "border-top-width: 0px;" on
the _empty_ DIV.
Severity: normal → minor
Keywords: testcase
Summary: 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 is placed in a subsequent div using CSS & XHTML strict
(Assignee)

Comment 5

14 years ago
Created attachment 128038 [details] [diff] [review]
patch
(Assignee)

Updated

14 years ago
Attachment #128038 - Flags: superreview?(bzbarsky)
Attachment #128038 - Flags: review?(bzbarsky)
Comment on attachment 128038 [details] [diff] [review]
patch

Doh.  r+sr=bzbarsky
Attachment #128038 - Flags: superreview?(bzbarsky)
Attachment #128038 - Flags: superreview+
Attachment #128038 - Flags: review?(bzbarsky)
Attachment #128038 - Flags: review+
(Assignee)

Comment 7

14 years ago
Taking.
Assignee: block-and-inline → dbaron
Priority: -- → P2
Whiteboard: [patch]
Target Milestone: --- → mozilla1.5beta
(Assignee)

Comment 8

14 years ago
Fix checked in to trunk, 2003-07-21 23:13:45 -0700.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.