Center float-Boxen horizontal

Möchte ich einige anzeigen floating-Boxen (divs mit thumbnails) und die Anzahl der Bilder hängt von der aktuellen Seitengröße. Zum Beispiel:

<div class="container">
  <div class="box1" style="float:left;width:120px;height:120px;margin-right:10px;">Thumbnail image here</div>
  <div class="box2" style="float:left;width:120px;height:120px;margin-right:10px;">Thumbnail image here</div>
  <div class="box3" style="float:left;width:120px;height:120px;margin-right:10px;">Thumbnail image here</div>
  <div class="box4" style="float:left;width:120px;height:120px;margin-right:10px;">Thumbnail image here</div>
    .......... ETC
</div>

das problem ist, dass für eine gegebene Breite zeigt es zum Beispiel 4 Boxen in jeder Zeile, aber Sie sind alle Links ausgerichtet, und es gibt einige weißen Raum auf der rechten Seite, wie kann ich den center horizontal für jede Zeile??

Etwas wie dieses: http://realworldstyle.com/thumbs_3.html aber mit Boxen horizontal zentriert auf der Seite...

vielen Dank im Voraus,

InformationsquelleAutor fidoboy | 2009-12-04
Schreibe einen Kommentar