Closed Bug 291763 Opened 20 years ago Closed 20 years ago

Top div (id="innershell") is wider than parent div (id="outershell"), even though width is set to 100%.

Categories

(Core :: Layout, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: originalnutter, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(4 files)

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

The top div (id="innershell") is wider than its parent div (id="outershell"),
even though its width is set to 100% (of the parent).  If the page is resized,
one of the following will happen, seemingly at random:
-The parent div (id="outershell") expands so that it contains the top div
(id="innershell")
-Or the top div (id="innershell") shrinks to the size it should be but the
parent div (id="outershell") expands to the old width of the top div

Reproducible: Always

Steps to Reproduce:
1. Load the page...


Actual Results:  
The problem appeared as described.

Expected Results:  
As in IE, the top div should only be 100% (not counting padding) of its parent.
wfm Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
wfm Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050425

I´m resetting the Product: to Firefox, as you used Firefox for reporting
Can you retest using a current Firefox, either 1.7.7 or a trunk nightly?
Assignee: general → firefox
Product: Mozilla Application Suite → Firefox
QA Contact: general → general
Summary: Top div (id="innershell") is wider than parent div (id="outershell"), even though width is set to 100%. → Top div (id="innershell") is wider than parent div (id="outershell"), even though width is set to 100%.
Version: unspecified → 1.0 Branch
Checked with the latest nightly builds of Firefox and Mozilla as of 27/04/05,
still a problem.
Attached file reduced testcase
bug is seen on reload, when downloading from the net. It isn´t seen if local
copy (saved as page, complete) is loaded. Shift-Reload restores the original
display.

Testcase made from local copy:
step 1: I replaced a link to an local image with a link from the original
server, and bug was seen.

<div class="innershell" id="backgroundimage" style="width: 100%;"><img
src="http://www.blackfaldslibrary.com/new/backgrounds/backbottom01.jpg" ></div>


Step 2: reduced CSS

The bug is the gap top-right, produced by the <br> tags.
If I remove the some or all <br> tags, it gets less deep or is completely gone.

If I remove	overflow:hidden; from outershell, bug is gone.
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050426 Mnenhy/0.7

Bug depends on "overflow hidden" and an image loading from the internet.

Steps to repeat:

1. Load http://www.blackfaldslibrary.com/new/ or testcase
https://bugzilla.mozilla.org/attachment.cgi?id=182172

2. Reload to see bug
3. Shift-Reload to see bug gone
Assignee: firefox → nobody
Component: General → Layout
Keywords: testcase
Product: Firefox → Core
QA Contact: general → layout
Version: 1.0 Branch → Trunk
Attached file minimized testcase
<style type="text/css">
.outershell {
	background-color: #CCCCCC;
	padding: 20px;
	overflow:hidden;  /* removing this line cures the bug */
}
.innershell {	
	background-color: cyan; 
	width: 100%;
	overflow:hidden;			
}
</style></head>
<body>
	<div class="outershell" style="width: 400px;">
		<div class="innershell">Reload to see the bug<br><br></div>
		<div class="innershell"><img
src="https://bugzilla.mozilla.org/mozilla-banner.gif" alt="lizard"></div>
	</div>
</body></html>
wfm Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050510 Mnenhy/0.7
Win98SE, XP1600, DSL
resolving wfm
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050510
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050509 Firefox/1.0+

Win98, Celeron 333, slow Internet connection

feel free to reopen, if you still see the bug in younger builds.
Status: UNCONFIRMED → 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: