zaczynam przygodę z CSS+DIV. Wcześniej robiłem wszystko na tabelach. Mam poniższy kod:
plik css
html, body { background: url(images/strony_internetowe_tlo.jpg); width: 1000px; margin: 0px 0px 0px 0px; } div#main { width: 950px; height: 500px; text-align: center; position: absolute; left: 50%; margin-left: -475px; } div#top { background: Yellow; width: 950px; height: 50px; text-align: center; position: absolute; left: 0%; margin-left: 0px; } div#left { background: Black; width: 50px; height: 100%; text-align: center; position: static; left: 0%; margin-left: 0px; top: 50px; float: left; } div#right { background: blue; width: 50px; height: 100%; text-align: center; position: static; top: 50px; float: left; } div#content { background: fuchsia; width: 850px; height: 100%; text-align: center; position: static; top: 50px; float: left; } div#footer { background: #b22222; width: 850px; height: 50px; text-align: center; position: static; float: left; vertical-align: baseline; left: 0px; } div#substance { background: aqua; width: 850px; text-align: center; position: static; float: left; height: auto; left:0px; vertical-align: baseline; }
plik html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <meta name="generator" content="PSPad editor, www.pspad.com"> <link rel="stylesheet" href="style.css"> </head> <body> <div id="main"> <div id="top"> </div> <div id="left"> </div> <div id="content"> <div id="substance"> </div> <div id="footer"> </div> </div> <div id="right"> </div> </div> </body> </html>
czemu tylko w divach top i footer wyświetlana jest jakakolwiek zawartość? Jak zrobić, aby div substance wypełniał całą zawartość diva content minus footer?
z góry dzięki wielkie za pomoc