css - Need adjustable content divs (between header and footer divs) based on browser size -


i having problems page's layout. feel answer simple, , i've done quite bit of work searching answers , experimenting, can't seem nail it.

the page needs header , footer fixed height, adjust horizontally browser window. in between, there 'main' div should expand horizontally , vertically fill available space between header , footer (but can't have scrollbars appear on browser window). 'main' div should have left 'sidebar' of fixed width , 'content' div taking remaining space.

i had image attach explains working towards, don't have 10 rep new user can't attach images (due 'spam prevention mechanism').

i have been playing fiddle here: http://jsfiddle.net/purjn/4/

i'm looking pointers , direction. please feel free mess fiddle.

thanks,
j

use absolute positioning. seems don't need "main" div, won't hurt either.

#header {     position: absolute;     top: 0;     left: 0;     right: 0;     height: 75px; } #sidebar {     position: absolute;     top: 75px;     left: 0;     bottom: 75px;     width: 250px; } #content {     position: absolute;     top: 75px;     left: 250px;     right: 0;     bottom: 75px; } #footer {     position: absolute;     bottom: 0;     left: 0;     right: 0;     height: 75px; } 

http://jsfiddle.net/gilly3/purjn/7/

it works without divs: http://jsfiddle.net/gilly3/purjn/8/


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -