Closed
Bug 182837
Opened 22 years ago
Closed 22 years ago
document element (html, root) clips contents
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 174149
People
(Reporter: dhtmlkitchen, Assigned: dbaron)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.2) Gecko/20021126
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.2) Gecko/20021126
The HTML Element does not stretch to accomodate it's contents when said contents
have:
position:relative;
top (n)px;
Where n is any number, the canvas will scroll to:
canvas_overflow - Math.min(canvas_overflow, n(px)).
Reproducible: Always
Steps to Reproduce:
1. See the testcase.
2. Try to scroll all the way to the bottom.
3. fail.
Actual Results:
It is impossible to reach the bottom of the contents.
Expected Results:
content can be scrolled to and is not clipped by document element or canvas.
* Root element should be displayed with height: auto.
If height: 100% is specified, it should then stretch to fill the viewport (it does).
It should not clip the content unless overflow: hidden is specified.
Is the canvas not scrolling enough, or is the html element not expanding enough?
HTML{ overflow: auto; }
Causes the viewport scrollbar to disappear completely. No scrollbar is displayed
on HTML Element, a block level element (another bug).
This bug affects every page on my site, http://dhtmlkitchen.com/. I am going to
use height: 110% for my own pages, but I shouldn't have to.
Reporter | ||
Comment 1•22 years ago
|
||
Comment 2•22 years ago
|
||
->Style System
Assignee: asa → dbaron
Component: Browser-General → Style System
QA Contact: asa → ian
Comment 3•22 years ago
|
||
This bug is INVALID: we display this correctly....
What happens is that when you use position: relative, everything is computed
first before we reposition the div. So you are able to scroll only as far as
you would if you used position: static.
See http://www.w3.org/TR/CSS21/visuren.html#propdef-position
If you want to create an "offset" of the div, use margin-top and/or
margin-bottom instead of relatively positioning.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Assignee | ||
Comment 4•22 years ago
|
||
Reopening, since overflow should be computed afterwards.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Assignee | ||
Comment 5•22 years ago
|
||
*** This bug has been marked as a duplicate of 174149 ***
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 6•22 years ago
|
||
Use position: absolute for abs to make margin work.
Reporter | ||
Comment 7•22 years ago
|
||
http://www.w3.org/TR/CSS21/visudet.html#q17
"...If 'height' is 'auto', the height depends on whether the element has any
block-level children and whether it has padding or borders.
...
Only children in the normal flow are taken into account (i.e., floating boxes
and absolutely positioned boxes are ignored, and relatively positioned boxes are
considered without their offset)..."
This means that Christopher is right.
I still think that the HTML element should not be clipped.
I also think that if it has overflow: auto, the html element should have a
scrollbar (I mentioned this in my initial report).
Is it up to the browser to determine whether to allow scrolling? It just seems
like I should be able to scroll to stuff on the page.
I tried initially to use margin-top for the element even before Christopher told
me I should. It doesn't work, though, so I used top instead of margin-top.
Should I file a bug for the margin problem? See the attachment, please.
You need to log in
before you can comment on or make changes to this bug.
Description
•