Niedawno rozpocząłem swoją przygodę z CSSami i niestety jak zapewne każdy rozpoczynający swoją przygodę mam problem z dopasowaniem wyglądu dla kilku różnych przeglądarek. Obecnie testuję stronę na IE8 oraz Chrome.
Problem stanowi bowiem szerokość div#menu ul li a:link, ul li a:visited oraz div#menu ul li a:hover. W przypadku IE8 width: 200px wyśmienicie spełnia swoje zadanie, natomiast w przypadku Chrome przy ustawionym width:200 (pewnie z powodu left-border oraz padding) szerokosc menu jest w rzeczywistosci duzo większa i wpada na div="menu".
body { background: rgb(240,240,240); font-family: Arial, Helvetica, Verdana, Sans-serif; font-size: 12px; } div#container{ width:800; background: white; margin: auto; display: block; } div#header{ height: 220px; background: red; } div#menu_header{ font-family: Verdana; font-size: 15px; font-weight: bold; padding: 2px 0 0 0; color: white; text-align: center; text-transform: uppercase; width:200px; height:20px; background: #006400; float: left; clear: left; -webkit-border-top-left-radius: 10px; -webkit-border-top-right-radius: 10px; -khtml-border-radius-topright: 10px; -khtml-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; -moz-border-radius-topleft: 10px; border-top-right-radius: 10px border-top-left-radius: 10px; } div#menu{ background: white; float: left; clear:left; width:200px; } div#menu ul{ width:200px; color: white; font-weight: bold; margin: 0; padding: 0; } div#menu ul li{ border-bottom: 1px solid #9ce; list-style: none; } div#menu ul li a:link, ul li a:visited{ display: block; width: 200px; text-decoration: none; padding: 7px; font-weight: bold; background-color: #27c; color: #def; border-left: 10px solid #25b; } div#menu ul li a:hover{ width: 200px; background-color: orange; color: #fff; border-left: 20px solid #26d; } div#down_menu_header{ font-family: Verdana; font-size: 15px; font-weight: bold; padding: 2px 0 0 0; color: white; text-align: center; text-transform: uppercase; margin-top: 30 px; width:200px; height:20px; background: #006400; float: left; clear: left; -webkit-border-top-left-radius: 10px; -webkit-border-top-right-radius: 10px; -khtml-border-radius-topright: 10px; -khtml-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; -moz-border-radius-topleft: 10px; border-top-right-radius: 10px border-top-left-radius: 10px; } div#down_menu{ width:200px; height:100px; background: rgb(255,180,0); float: left; clear: left; } div#content{ background: white; margin-left: 200px; padding: 15px; line-height: 18px; } div#footer{ height: 30px; background: rgb(255,180,0); font-family: Tahoma, Arial, Helvetica, Sans-serif; font-size: 10px; color: white; clear: both; -webkit-border-bottom-left-radius: 8px; -webkit-border-bottom-right-radius: 8px; -khtml-border-radius-bottomright: 8px; -khtml-border-radius-bottomleft: 8px; -moz-border-radius-bottomright: 8px; -moz-border-radius-bottomleft: 8px; border-bottom-right-radius: 8px border-bottom-left-radius: 8px; } div#footer div#altnav{ width: 350px; float: right; text-align: right; } div#footer a { color: white; text-decoration: none; } div#footer a:hover { color: red; }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <link rel="stylesheet" href="tmp.css" type="text/css"> </HEAD> <BODY> <div id="container"> <div id="header"> </div> <div id="menu_header"> MENU: </div> <div id="menu"> <ul> </ul> </div> <div id="down_menu_header"> KONTAKT: </div> <div id="down_menu"> </div> <div id="content"> TEKST </div> <div id="footer"> <div id="altnav"> </div> </div> </div> </BODY> </HTML>
Mam nadzieję, że problem przedstawiłem wystarczająco jasno

Z góry bardzo dziękuję za pomoc.
Pozdrawiam
Jacek