Grow your CSS skills. Land your dream job.

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 http://www.layersdesignstudio.com/websites/saloon_ro/

    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

    Code:
    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.

    Thanks

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".