Closed Bug 504084 Opened 16 years ago Closed 16 years ago

An <h1> with margin and padding set to zero still appears to have padding (space for descenders under image)

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: justin, Unassigned)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729) <h1 style="padding: 0; margin: 0; border: 1px solid black;"><img src="..."></h1> Reproducible: Always Steps to Reproduce: Please see attached test case. Actual Results: Space appears between the bottom of the image and the border of the heading. Expected Results: The top and bottom border of the heading should be flush against the top and bottom of the image. Workaround is to set the height of the heading to the height of the image.
Attached file Test case
Attached image Image for test case
Should be placed in the same directory as margin.html
That's because the image is sitting on the baseline of the text; there's room for descenders underneath it. You might get the results you expect if you use 'vertical-align: top' or 'vertical-align: bottom' on the image.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Component: Layout → Layout: Block and Inline
OS: Windows Vista → All
QA Contact: layout → layout.block-and-inline
Hardware: x86 → All
Resolution: --- → INVALID
Summary: An <h1> with margin and padding set to zero still appears to have padding → An <h1> with margin and padding set to zero still appears to have padding (space for descenders under image)
Whoops. Sorry, my bad. Was getting confused with the different implementations out there and wasn't sure which was the correct one.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: