<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <link rel="stylesheet" type="text/css" href="main_style.css"> <div id="container"> <div id="header"> Logowanie <br> <form action="index.php" method="post"> <input type="submit" name="log" value="Zaloguj"> </form> </div> <div id="menu"> menu </div> <div id="main"> main </div> <div id="footer"> fot </div> </div>
#container { position: relative; width: 1000px; margin: 0 auto; } #header { width: 1000px; background-color: green; } #menu { width: 200px; float: left; background-color: yellow; } #main { width: 800px; float: left; background-color: red; } #footer { width: 1000px; clear: both; background-color: blue; }
wszystko jest okej, ale tekst jest zbyt blisko ramek. chcialem dodac wiec padding 10px do wszystkich elementow (oprocz kontenera) co zepsulo zupelnei ulozenie strony. czy to ma jakis zwiazek z uzyciem float: left? i jesli tak to jak to pogodzic?