<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="stylesheet" href="style.css" type="text/css"/> </head> <body> <div id="wrapper"> <div id="top"> top </div> <div id="menu"> menu </div> <div id="content"> <div id="left"> left </div> <div id="center"> center</br> center</br> center</br> center</br> center</br> center</br> center</br> center</br> center</br> center</br> </div> <div id="right"> right</br> right</br> right</br> right</br> right</br> </div> </div> <div id="footer"> footer </div> </div> </body> </html>
Do tego plik css:
html, body, div { margin: 0; padding: 0; } #wrapper { margin: 0 auto; width: 1000px } #top { background: blue; height: 150px } #menu { background: yellow } #content { background: red; width: 1000px; } #left { width: 200px; float: left } #center { width: 600px; float: left } #right { width: 200px; float: left } #clear { clear: both; } #footer { background: orange; width: 1000px }
Chciałbym aby div content rozszerzał się w dół w zależności od wysokości divów w nim zawartych. W zasadzie w zależności od wysokości diva center, gdyż jest to div z treścią i z reguły będzie najdłuższy.