Ich habe ein kleines Problem mit meiner Navigation, welche ich CSS machen möchte.
Sie aus einer Liste bestehen und horizontal angeordnet sein. So weit, so gut. Ich möchte jedoch dem aktiven Listenpunkt ein anderes Hintergrund geben. Ich dachte, dass dies mit <li class="aktiv">... geht. Jedoch wird einfach nichts angezeigt.
Mein Beispiel:
HTML:
- Code: Alles auswählen
<div id="navi">
<ul>
<li class="aktiv">1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div> <!-- end navi -->
CSS:
- Code: Alles auswählen
#navi {
padding: 10px 0 10px 0;
}
#navi ul {
margin: 0 0 0 5px;
padding: 0;
list-style: none;
}
#navi li {
display: inline;
border: 1px solid #black;
padding: 10px 40px 10px 40px;
margin-left: -5px;
background: #ffffff url("../images/navi.png") repeat-x;
}
#navi li.aktiv {
background: #ffffff url("../images/navi_aktiv.png") repeat-x;
}
Ich hoffe, ich mache das nicht komplett falsch...?
Danke für eure Hilfe und freundliche Grüsse
sartOrial
