Leider wenn ich den padding auf bsw. nicht 0 setze, wird das 2. Menü immer verschoben, warum?
Wie kann ich das verhindern?
body { background: #ffffff url(bg.jpg) no-repeat; } #slogan { margin: 0px; padding: 0px; position: absolute; top: 154px; left: 14px; background-image: url(slogan.jpg); width: 410px; } #p_slogan { margin: 0px; padding: 0px; padding-top: 6px; padding-left: 1px; padding-bottom: 6px; min-height: 15px; font-size: small; font-weight: bold; font-family: Georgia; background: url(slogan_l.jpg) no-repeat bottom left; } #menu { background-image: url(menu_l.jpg); position: fixed; left: 476px; top: 0px; width: 200px; height: 100%; } #nav { padding: 0px; margin: 0px; position: relative; top: 153px; text-align: center; list-style: none; display: block; } #nav a { margin: 0px; padding: 2px; background: url(link.jpg) no-repeat; width: 200px; height: 20px; float: left; color: white; font-weight: bold; text-decoration: none; font-size: 80%; } #nav a:hover { margin: 0px; padding: 2px; background-image: url(link_hover.jpg); width: 200px; float: left; color: black; font-weight: bold; }
<?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Pixelogo.de</title> <style type="text/css"> <!-- @import url(style.css); //--> </style> </head> <body> <div id='slogan'> <p id='p_slogan'> Next Generation Style - Barrierefrei durch Webstandards </p> </div> <div id='menu'> <ul id='nav'> <li><a href='test.html'>Referenzen</a><br /></li> <li><a href='test.html'>Leistungen</a><br /></li> <li><a href='test.html'>Über uns</a></li> </ul> </div> </body> </html>