- From: Jesse McCarthy <mccarthy36@earthlink.net>
- Date: Wed, 24 Oct 2001 13:04:02 -0400
- To: www-style@w3.org
Chris, I think you would be best served by first clarifying your own mental model. CSS does not "know" anything. CSS is a language for instructing the user agent what to do. The user agent knows the width and height of the viewport. Using CSS, you can instruct the user agent to format elements such as HTML and BODY to assume the entire width and height of the viewport. My complaint is that once I've done that, CSS provides me no mechanism for centering content vertically within those elements. Is that not correct? Chris Casciano <10sball@placenamehere.com> wrote on 10/24/01 12:34:06 PM: >Peter, i understand your frustration, so let me try and clarify what is >taking place here. What we have is a clash between the ones mental model of >the page and the actual model of the document. > >With small document (one that doesn't fill up the browser window) set a >border of a few pixels on the body. This should show what you're dealing >with. The *body* is as wide as the window, but only as tall as it needs to >be. This is often times shorter then the height of the browser window >itself. The minimum height of the document is not the browser height. It's >because of this that centering a box (div) inside of the containing box >(body) would not center it in the "box" that is the browser opening. >Therefore, in reality, CSS doesn't know about the height *or* the width of >the browser, it just happens that the width of the document IS the width of >the browser. > >Now, i'll withhold any comments on whether I think this is the right >approach, I will just say that I've seen *a lot* of folks not expecting it >to work this way (or wanting it to work differently). > >-- >name://chris aka://10sball http://placenamehere.com
Received on Wednesday, 24 October 2001 13:11:12 UTC