Reply to Re: CSS styles with 100% height

Your name:

Reply:


Posted by Chaddy2222 on 10/23/07 17:45

Els wrote:
> 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.
>
Is there much point in setting the hight to auto? I don't tend to do
that a lot but I do and have done so for some sites I've worked on.

> > 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...
>
I have learned a lot of stuff from here as well. I still am.
HTML Dog is a good site: http://www.htmldog.com they have some nice
moddern tutorials and some good articles.
http://www.carlcore.com is a good site for such articles as well.
Oh and I have some rather old ones of my own, http://freewebdesign.awardspace.biz/wdto
they were all written as far back as 2005. Some are from last year.
--
Regards Chad. http://freewebdesign.awardspace.biz

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация