Gewusst wie: Gruppe auflisten
Erfahren Sie, wie Sie mit CSS eine Basisliste in eine "Listengruppe" umwandeln.
Gruppe auflisten
- Adele
- Agnes
- Billy
- Bob
- Calvin
- Christine
- Cindy
So erstellen Sie eine Listengruppe
Schritt 1) HTML hinzufügen:
Beispiel
<ul>
<li>Adele</li>
<li>Agnes</li>
<li>Billy</li>
<li>Bob</li>
<li>Calvin</li>
<li>Christina</li>
<li>Cindy</li>
</ul>
Schritt 2) CSS hinzufügen:
Beispiel
ul {
list-style-type: none; /* Remove bullets */
padding:
0; /* Remove padding */
margin: 0; /* Remove margins */
}
ul li {
border: 1px solid #ddd; /* Add a thin border
to each list item */
margin-top: -1px; /* Prevent double borders */
background-color: #f6f6f6; /* Add a grey background color */
padding: 12px; /* Add some padding */
}
Tipp: Besuchen Sie unser CSS-Listen-Tutorial , um mehr über HTML-Listen und deren Gestaltung zu erfahren.