|
Posted by Els on 10/23/07 14:53
nospam wrote:
> Thanks for the reply.
Please, don't top post. Top posting is writing a reply above the stuff
you reply to. Reading from top to bottom, this is weird.
Rest of reply re-ordered:
> "Els" <els.aNOSPAM@tiscali.nl> wrote in message
> news:1xeuh2c28qdtg.1dn375om2tv05$.dlg@40tude.net...
>> nospam wrote:
>>
>>> But if I use height=100% and width=100px, the height doesnot
>>> encompass the entire page - maybe only 200px or so.
>>>
>>> How do you define a style with 100% height?
>>
>> 100% height is 100% of the parent's set height. Apparently the
>> parent's set height is only 200px or so.
>> You can of course add body{height:100%;}, but be aware that this will
>> likely have unwanted side effects if your page is taller than the
>> viewport.
>
> What is the parents set height?
The height that was set on the parent element:
Example:
<body>
<div>
<p>hello</p>
</div>
</body>
Body is the parent of div, and div is the parent of p. P is the child
of div, and the grandchild (descendant) of body.
> Is that defined in CSS or in the web page HTML?
The height is set through CSS (if you do it right :-) ).
In the above example, setting 100% height for body, div and p, would
make all these elements 100% high. But if the content of p is taller
than the viewport, it will go "outside" this 100%. Try it out to see
what I mean, and then accept different lengths of pages - don't set
100% height. Don't set any height, let it extend as far as is needed
to display your content.
> What is the viewport?
The inside of the four sides of your browser.
The area you have available to show your webpages. Its size is defined
by your visitors, and they all use different size windows.
> I guess I need to dig into how the browser interacts with CSS to render
> itself.
How the browser renders itself? Don't think you need to know - can't
remember I ever even thought about that.
> Do you have any good books, pointers or recommendations for that?
Not really - I learned most stuff right here, in alt.html...
--
Els http://locusmeus.com/
Navigation:
[Reply to this message]
|