Closed
Bug 239219
Opened 22 years ago
Closed 22 years ago
table with position:absolute; width:100% without "left:" doesn't fit the window
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: el_rulero, Unassigned)
Details
Attachments
(1 file)
|
519 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040330
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040330
a table using style="width: 100%; position: absolute;" (without specifieng the
"left:...") will be wider than the window
Reproducible: Always
Steps to Reproduce:
1. create an html file with a table like this:
<table style="width: 100%; position: absolute;">
2. view the page in a recent version of mozilla
Actual Results:
the page doesn't fit in the window
that's because the table has the same width as the window, but "left:" doesn't
default to zero (it defaults to the space used by a position-relative-table) so
the page ends up being wider than the window
Expected Results:
the actual sizes of widht:100% and left:auto should be consistent, either:
1) "left:" defaults to zero and the table width is the window width
or better yet...
2) "left:" AND the actual width of the table use the same values used by a
normal (position:relative) table
| Reporter | ||
Comment 1•22 years ago
|
||
Comment 2•22 years ago
|
||
Actually, this layout is exactly correct. Auto left uses the static position,
per CSS spec, and 100% width uses the width of the containing block, also per
CSS spec. In this case the containing block is the body for static/relative
position, and the <html> for absolute position. Since the body is what has left
margins, the two containing blocks have different widths.
It sounds like what you really want is to use right:0 instead of width:100%.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•