Hallo Leute,
--snip--
formatiere einfach :first-child und :last-child so, dass sie nicht die Abstände besitzen, die für alle anderen Items gelten.
Cheatah
»»
Ich ahnte schon das dieser Vorschlag kommt! :)
Wenn ich das tue entsteht leider folgendes:
|Home | Eintrag1 | Eintrag2 | Ende|
Du siehst das die Abstände nicht gleich sind. Zwischen Home und Eintrag1 ensteht ein 1.5 facher Abstand währen zwischen Eintrag1 und Eintrag2 ein 1 facher Abstand ex.
Aber ich hab's gelöst!
#navigation {
width: 750px;
margin: auto;
padding: 0;
font-family: sans-serif;
font-size: 8pt;
font-style: bold;
}
#navigation a {
color: #555555;
text-decoration: none;
}
#navigation a:hover {
text-decoration: underline;
}
#navigation a.clicked {
color: #8e13ce;
}
#navigation ul {
display: table;
width: 100%;
margin: 5px 0 5px 0;
padding: 0;
}
#navigation ul li {
display: table-cell;
padding: 0;
text-align: center;
}
#navigation ul li.first {
text-align: left;
}
#navigation ul li.last {
text-align: right;
}
Verbesserungen sind natürlich willkommen!
Goran