3 DIV's - Center Middle and Others taking up rest of room
Posted
by
Adam
on Stack Overflow
See other posts from Stack Overflow
or by Adam
Published on 2012-09-22T09:01:46Z
Indexed on
2012/09/22
9:37 UTC
Read the original article
Hit count: 184
I need to have 3 DIV's - you can see 3 colors in the above image.
The middle DIV needs always be 960px and alls needs to be centered (you can see the 2 grey lines above).
The other 2 DIV's need to take up all the other available space. If I zoom in and out of the page the red and yellow DIV's need to expand with the page while the middle green one remains centered.
I've tried DIV solutions and Table solutions and I can't get it to fit.
HTML
<div id="div1" style="background-color:red"></div>
<div id="div2" style="background-color:red"></div>
<div id="div3" style="background-color:red"></div>
any advice would be appreciated.
thx
** Update: http://jsfiddle.net/scxAq/
working on this... with limited success...
© Stack Overflow or respective owner