Tło i obramowanie menu wychodzi sporo poza "ramy" strony. Problem występuje w Operze 10, FF 3,5 i Chrome 3.0,a o dziwo w IE6 działa tak jak powinno i proszę nie zwracać uwagi na kolorystykę, bo to nie tak będzie wyglądać strona.
IE6
Opera
Chrome
Firefox
Plik index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="pl"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="Osiek" /> <meta name="language" content="pl" /> <link href="main.css" type="text/css" rel="stylesheet" /> </head> <body> <h1> <img src="images/top.png" alt="top strony" width="794px" height="164px"/> </h1> <ul id="navigation"> </ul> <div id="main-content"> </div> <div id="footer"> </div> </body> </html>
Plik main.css
html {width: 100%;} body { width: 800px; margin: 0 auto; background-color: rgb(250, 0, 0); } h1 { height: 164px; width: 794px; border: solid 3px #fff; margin-top: 35px; margin-bottom: 0; } #main-content { width: 794px; border: solid 3px #fff; } #navigation { margin: 0; width: 794px; height: 24px; border: solid 3px #fff; background-color: #000; text-align: center; } #navigation ul { padding: 0; margin: 0; list-style: none; } #navigation li { display: inline; } #navigation a { width: 120px; height: 24px; display: block; color: #fff; text-decoration: none; background-color: #000; float: left; } #navigation a:hover, a:active { text-decoration: underline; width: 120px; height: 24px; display: block; color: #000; background-color: #fff; float: left; } #footer { width: 794px; height: 50px; margin: 0; border: solid 3px #fff; text-align: right; }