CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
CSS Combat
Forcing height to be % of the browser window
RohanJM
Permalink to comment
#
December 2009
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
tomwalters5678
Permalink to comment
#
December 2009
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% }
RohanJM
Permalink to comment
#
December 2009
No sorry, I forgot to mention I need the height to be 98% not the width.
Thanks
Add a Comment
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
Thanks