Jak wyśrodkować menu, żeby było na środku?
ul#topnav { margin: 0; padding: 0; list-style: none; font-size: 1.1em; } ul#topnav li{ margin: 0; padding: 0; overflow: hidden; /*--Important - Masking out the hover state by default--*/ float: left; height:40px; } padding: 10px 20px; float: left; text-decoration: none; color: #fff; background: url(a_bg.gif) repeat-x; text-transform: uppercase; clear: both; width: 100%; height: 20px; line-height: 20px; /*--Vertical alignment of text--*/ } ul#topnav a{ /*--This is basically the hover state of navigation--*/ color: #555; background-position: center bottom; } ul#topnav span{ /*--Default state of navigation--*/ background-position: center top; } #men { width: 100%; height: 40px; background: url(a_bg.gif) repeat-x; }
Tak to wygląda:
