The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Programming Fundamentals" Dec 02 - 2:00 PM Eastern

Forcing height to be % of the browser window

  • # December 2, 2009 at 2:31 pm

    Hi all,

    How do I get a div to be 98% of the browser window using CSS, also I want my layout to spread evenly thru different browser window width’s.

    Heres the link to the site

    Thanks for the help guys,
    Rohan Merchant

    # December 2, 2009 at 4:05 pm

    Surely you would create a div in which you would place your content, making the body of the page 100%, and the div 98%. So your CSS would be

    body { width:100% }
    #div { width:98% }
    # December 2, 2009 at 9:51 pm

    No sorry, I forgot to mention I need the height to be 98% not the width.


Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed