Closed
Bug 274831
Opened 20 years ago
Closed 19 years ago
absolute positioning used with percents yields incorrect boundaries
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jeff, Assigned: bugzilla)
Details
Attachments
(1 file)
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041215 Firefox/1.0+
I used a table element with a position:absolute height=100% (or width). The
upper left corner is correct, but the lower left corner goes past the lower
left edge of the browser (its width tag is of the browser instead of its
parent.)
Reproducible: Always
Steps to Reproduce:
just to show the problem...
<table style=position:absolute border=1 width=100% height=100%
><tr><td>a</td></tr>
to show the problem a little more clearly, in a 2x2 table as the lower right
cell
<table width=100 height=100><tr width=50><td width=50></td><td
width=50></td></tr><tr><td></td><td> <table style=position:absolute border=1
width=100% height=100%><tr><td>a</td></tr> </td></tr>
Actual Results:
borders are browsers width x browsers height
Expected Results:
borders should be ~50x50
Comment 1•20 years ago
|
||
clearly demonstrated in http://www.hostmanila.com/t_fxbug01 (though my problem is at http://www.audiocompulsion.com, a clean code better demonstrates the problem).
Testcase. No table, no Doctype(as irrelevant), plain DIVs, colored border for visibility. Tested with Firefox 1.0.4 . Works in IE 6 and Opera 7 .
Comment 3•19 years ago
|
||
The behavior you are seeing is correct as defined by the CSS 2.1 specification. The section of interest is 9.6 Absolute Positioning [1]. As stated there, absolutely positioned boxes are "removed from the normal flow entirely" and a new box is created. Marking this bug as INVALID. [1] http://www.w3.org/TR/CSS21/visuren.html#absolute-positioning
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Comment 4•19 years ago
|
||
(In reply to comment #3) > The behavior you are seeing is correct as defined by the CSS 2.1 specification. > The section of interest is 9.6 Absolute Positioning [1]. As stated there, > absolutely positioned boxes are "removed from the normal flow entirely" and a > new box is created. More relevant is 9.8.4, where it states "The containing block for a positioned box is established by the nearest positioned ancestor (or, if none exists, the initial containing block, as in our example)". Thus, setting the outer div in the example to 'position: relative' correctly causes the inner box to become a percentage of that width instead of window width.
You need to log in
before you can comment on or make changes to this bug.
Description
•