<ul>
<li><img src="picture.png"><p>Caption text</p></li>
<li><img src="picture.png"><p>Caption text</p></li>
<li><img src="picture.png"><p>Caption text</p></li>
</ul>
Then the following gives you what you've asked for in your example:
li {
float: left;
list-style: none;
}
If that's not what you're looking for, some actual example code might make this less of a hypothetical question.<div id="wrapper"> with the property #wrapper { margin: 0 auto; } (as titantoppler said).You are not logged in, either login or create an account to post comments
- Put the thumbnail and the caption in a div of its own.
- The thumbnail is displayed as a block element (display:block)
- The div is displayed inline (display:inline)
Didn't really get the part about centering the thumbnails inside a parent element, but I assume that the whole row of thumbnails are to be placed in the center.
If that's the case, wrap all the divs (from each individual thumbnail) into a larger container div that has the properties margin:0 auto
HTH
posted by titantoppler at 7:11 PM on June 27