homepage Welcome to WebmasterWorld Guest from 54.224.75.101
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Pubcon Website
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library : Charter : Moderators: whoisgregg

JavaScript and AJAX Forum

    
Dynamically Setting Div Height
Want to fill client area exactly
gsmith




msg:3829707
 6:24 pm on Jan 19, 2009 (gmt 0)

I'm using a very popular Map homepage as an example of what I'd like to do.

The page is set so that the client area of the browser is filled up precisely. The map is contained in a div element, and the height property is set inline on the style attribute of the div.

Resizing the window results in the height property being reset to exactly fill to the bottom of the page, so that there is no need to display a scroll bar.

How can this be done, including before the page is first displayed?

Thanks in advance!

 

Little_G




msg:3837806
 10:32 pm on Jan 29, 2009 (gmt 0)

Hi,

Have you considered using CSS? You could set the div's position to absolute or relative and use the top, bottom, left, right properties [w3.org] to make it fill the viewport.

Andrew

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved