Hallo,
ich will mit CSS eine kleine Galerie gestaltet. Der XHTML-Code ist dafür so aus:
HTML-Code:
<ul class="photos">
<li><a href="_img/photos/people_bank.png" rel="lightbox" title="Erholung"><img src="_img/photos/people_bank_thumb.png" class="leftalign" alt="Foto" /></a></li>
<li><a href="_img/photos/people_flasche.png" rel="lightbox" title="Erholung"><img src="_img/photos/people_flasche_thumb.png" class="leftalign" alt="Foto" /></a></li>
<li><a href="_img/photos/people_kuss.png" rel="lightbox" title="Erholung"><img src="_img/photos/people_kuss_thumb.png" class="leftalign" alt="Foto" /></a></li>
<li><a href="_img/photos/people_wand.png" rel="lightbox" title="Erholung"><img src="_img/photos/people_wand_thumb.png" class="leftalign" alt="Foto" /></a></li>
<li><a href="_img/photos/people_wanderer.png" rel="lightbox" title="Erholung"><img src="_img/photos/people_wanderer_thumb.png" class="leftalign" alt="Foto" /></a></li>
</ul>
und der CSS-Code so:
Code:
.photos {
width: 550px;
list-style-type: none;
list-style-image: none;
padding-top: 10px;
padding-bottom: 1px;
padding-left: 10px;
float: left;
}
Mein Problem ist jetzt, dass alle Bilder nebeneinander angezeigt werden und dabei über die 550px hinausschießen. Bisher habe ich noch nicht den Grund gefunden, warum nach dem dritten Bild nicht umbrochen wird. Oder kann man eine solche Galerie nicht mit Hilfe einer Liste bauen?
Grüße
Christian