ShutterMan wrote:
> Thanks
For what?
http://www.jibbering.com/faq/faq_not...s.html#ps1Post
> but I need javascript code that will resize the DIV to the height of the page.
The "page" has no fixed height. There are no Web pages, unless you print
them out or make a presentation of them, BTW. These are (X)HTML documents.
> See, I dynamically add stuff inside a div. The layout is more like:
>
> <body>
> <div id="containter">
> <div id="dyanmic">
> </div>
> </div>
> </body>
>
> Where "container" has a repeating image in the background. The
> problem is, body is set to 100%, the container is set to 100%. Only
> works if I set container's height to an actual set value.
Then you are doing something else wrong. div[id="container"] here is always
as high as the document body is. If you are referring to the viewport
instead, you have to use absolute positioning.
> HTML doesnt seem to want to help me in this,
Of course not, HTML is a markup language.
> as when I set container to 100%, its too small.
100% of the height of the document body is, well, the height of the document
body. It is not the height of the viewport.
> Only when I set it to an actual pixel size can I see the div.
That's unlikely, but YMMV.
> And with dynamic stuff within it, its usually the wrong size.
Wrong according to what?
> Setting body to a pixel size doesnt work.
Then you are doing something else wrong. Anyway, even though you attempt to
set the CSS properties with client-side scripting, this is not a script
problem (and so OT here) as long as you don't show some code that you deem
to be erroneous.
> Hence the request for doing this in javascript.
In almost all cases you can only do with the DOM (the API; not J[ava]Script,
the programming language) what the user agent already supports. This is
such a case.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$>