• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Navigationsleiste

alex141097

Neues Mitglied
Hey Leute,
Ich habe eine Navigationsleiste, aber ich will das sie 3cm Abstand zum Rand hat. Hoffe ihr koennt mir helfen. Danke im Voraus.

Das ist der HTML Code der Navigationsleiste
HTML:
<body>
<ul id="Navigation">
   <li><a href="home.html" ><b>Home</b></a></li>
   <li><a href="kontakt.html"><b>Kontakt</b></a></li>
   <li><a href="beispiele.html"><b>Beispiele</b></a></li>
   <li><a href="info.html"><b>Infos</b></a></li>
   <li><a href="impressum.html" class="aktiv"><b>Impressum</b></a></li>
</ul>
Das ist der CSS Code für die Navigationsleiste
HTML:
body {
       font: normal 100.01% Sans;
       color: #EE0000; background-color: white;
       }
    ul#Navigation  {
      margin: 0; padding: 0.8em;
      text-align: center;
      border: 2px solid #EE0000;
      background-color: silver;
     }
    ul#Navigation li  {
      list-style: none;
      display: inline;
      margin: 0.4em; padding: 0;
      }
    ul#Navigation a, ul#Navigation span  {
    padding: 0.2em 1em;
    text-decoration: none; font-weight: bold;
    border 1px solid black;
    border-left-color: white; border-top-color: white;
    color: maroon; background-color: #ccc;
    }
    * html ul#Navigation a, * html ul#Navigation span  {
    width: 1em;   /* nur fuer IE 5.0x erforderlich */
    w/idth: auto;
    }
    ul#Navigation a:hover, ul#Navigation span  {
    border-color: white;
    border-left-color: black; border-top-color: black;
    color: white; background-color: gray;

#box {
-moz-border-radius-topleft: 15px;
-moz-border-radius-topright: 0px;
-moz-border-radius-bottomright: 15px;
-moz-border-radius-bottomleft: 0px;
-webkit-border-top-left-radius: 15px;
-webkit-border-top-right-radius: 0px;
-webkit-border-bottom-left-radius: 0px;
-webkit-border-bottom-right-radius: 15px;
background-color:#000;
color:#CCC;
font-family:Verdana, Geneva, sans-serif;
font-size:16px;
text-align:center;
width:300px;
padding-top:50px;
height:50px;
 
<li><a href="home.html" ><b>Home</b></a></li>
Entferne bitte das <b>-Tag. Das ist physische Inhaltsauszeichnung und sollte daher nicht benutzt werden, weil es keine Semantik beschreibt.

Überlege Dir, warum Du das machst. Soll das wichtig sein? Dann ist <em> das richtige Tag. Soll es sehr wichtig sein? Dann ist <strong> das richtige Tag. Soll es nur fett sein und keine semantische Bedeung haben, dann machst Du es mit CSS: font-weight:bold. Ich schätze, letzteres ist bei Dir der Fall. Eine Auszeichnung mit einem der beiden anderen Tags macht nur Sinn, wenn man die aktuelle Seite hervorheben will.
 
Zurück
Oben