horaz
Hallo zusammen,ich versuche gerade ein Menü zu basteln, dabei möchte ich eine unsortiere Liste innerhalb von einem DIV-Container haebn. Mein Problem dabei ist, dass sich das div nicht an der Größe (Höhe) der UL anpasst. ich habe es schon mit display:inline; oder display:block versucht. Hilft alles nichts, die einzige Möglichkeit ist im HTML tag ein zu notieren. Was allerdings keine saubre Lösung ist, anbei das CSS und das Testhtml.
CSS:
| code: |
1:
|
body { margin: 0; padding: 0; background-color: #fff; color: #000; font-family: "Trebuchet MS", sans-serif; font-size: 100.01%; text-align: center;}/* Definieren von den einzelnen Bereichen */#all{ position:relative; margin:0em auto; background-color:#CBCBCB; width:50em; border:0px solid #000000; width:944px; height:100px; }#head{ background-image:url('./images/grafics/background.jpg'); width:944px; height:106px;}#logo{ background-image:url('./images/grafics/logo.png'); background-repeat:no-repeat; width:195px; height:100px; float:left;}#logo h1{ position:absolute; left:-3000px;} |
|
HTML:
| code: |
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>Gemeinde </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="./test.css" type="text/css" media="screen, projection"> </head> <body> <div id="navigation"> <ul> <li><a href="">Home</a></li> <li><a href="">Bürgerservice</a</li> <li><a href="">Orsteile</a</li> <li><a href="">Kirche</a</li> <li><a href="">Vereine</a</li> <li><a href="">Gewerbe</a</li> <li><a href="">Bilder</a</li> <li><a href="">Landkarte</a</li> </ul> </div> </body></html> |
|