Hi,
I'm getting some layout behaviour that I don't quite understand and was wondering if someone could help me out.
I've got a bunch of image thumbnails that I'm displaying inside an unordered list. I want the items to be listed inline, aligned to the right. Floating to the right causes the images to appear in reverse order, so I chose to set the li items display to 'inline'.
Funny thing is, the li elements don't seem to be sized according to their contained images, and there's a mysterious 3px extra gap underneath.
Here's the CSS:
.eslidegallery-thumbnails
{
position: relative;
text-align: right;
}
.eslidegallery-thumbnails *
{
padding: 0;
margin: 0;
}
.eslidegallery-thumbnails li
{
list-style: none;
display: inline;
}
.eslidegallery-thumbnails img
{
margin: 5px 0 0 5px;
}
and I've attached a FireBug screen grab. Note the highlighted li element and the box model dimensions.
The images are all 50px x 50px and as you can see, I've added a top and left margin of 5px.
I noticed that even when I was floating the li elements, the 3px gap underneath was still present.
Thanks guys!