Closed Bug 292653 Opened 20 years ago Closed 20 years ago

non-visible overflow and left/right padding causes extra padding at bottom

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bugzilla, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.01
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2

Mozilla miscalculates the required height of a block element if it has overflow:
hidden; (or other non-visible overflows), and either left or right padding.

When making the element tall enough to contain its contents, it seems to think 
the paddings are twice as wide as they actually are, making the element 
unnecessarily tall.

Test file (see URL) contains all required details, as well as an almost complete 
testcase (see the comment in the source for what needs to be removed to convert 
it into a testcase).

Reproducible: Always

Steps to Reproduce:
1. make a div and give it a few lines of content
2. give it a border so you can see where Mozilla thinks the edges of it are
3. apply overflow: hidden; to the div
4. apply padding: 0px 150px; to the div
5. load the page, and make the window wider and narrower
Actual Results:  
Mozilla will incorrectly leave a large gap under the text, inside the border. 
The size of the gap will change as the window width changes.

Expected Results:  
There should be no gap between the bottom of the text and the bottom border of 
the div.

n/a
Possibly related to/dupe of
https://bugzilla.mozilla.org/show_bug.cgi?id=233078
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050502
Firefox/1.0+

I see no red below the text. But I do in Firefox 1.03. Tarquin, can you try with
a nightly trunk (1.1beta) firefox build and report back? Thanks!

http://ftp.uni-erlangen.de/pub/mozilla.org/firefox/nightly/latest-trunk/
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050419
Firefox/1.0.4

on http://www.howtocreate.co.uk/mozBugs/paddingBug.html
I see red below the text as wide as I make it, BUT if I shrink the window to
where there is exactly one word per line, the red is gone.

I have a newer version of Aviary 1.0.1 branch than the reporter, and have the
problem, so am confirming it.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Worksforme on trunk.  Marking so. Please reopen if you can reproduce with a
_trunk_ (not 1.7-branch) build.  That is the "rv:" part in the UA shouldn't be
"1.7something".
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: