Closed Bug 182837 Opened 22 years ago Closed 22 years ago

document element (html, root) clips contents

Categories

(Core :: CSS Parsing and Computation, defect)

PowerPC
macOS
defect
Not set
normal

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.
->Style System
Assignee: asa → dbaron
Component: Browser-General → Style System
QA Contact: asa → ian
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
Reopening, since overflow should be computed afterwards.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
*** This bug has been marked as a duplicate of 174149 ***
Status: REOPENED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → DUPLICATE
Attached file Margin doesn't work
Use position: absolute for abs to make margin work.
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.

Attachment

General

Creator:
Created:
Updated:
Size: