I Can't get Images to Align Centered....

User 2388388 Photo


Registered User
129 posts

Hi everyone,

This should be an easy one for ya'll but I can't crack it and if anyone wouldn't mind setting me straight I'd be most appreciative.

What I have is several images aligned side by side on a page but the group of images is shifted to the left of the center column of my pages.

Here's what's in the html

<div class="Center">

<div class="thumbnail-small"><img src="image-files/gatorback-hs-evo-a-start-tn.jpg" alt="" height="80" width="80"></div>

<div class="thumbnail-small"><img src="image-files/gatorback-hs-evo-a-start-tn.jpg" alt="" height="80" width="80"></div>

//From here there would be several more <div class="thumbnail -small...'s

</div>

And in my CSS I have:

.thumbnail-small {
height:auto;
width:85px;
float:left;
margin: 10px 5px;
color: #fff;
text-align: center;
font: small-caption;
border:4px ridge #DDD;
background-color: #000;
padding: 5px;
}

Pretty simple I know but I just can't figure out how to get the whole block of these to align centered and side by side.

If anyone wouldn't mind showing me what Im miossing I'd be most appreciative and I thank you all once again in advance!!
User 122279 Photo


Senior Advisor
14,571 posts

That div class center, give it a width so that the images + spaces between + possible borders fit in exactly. Then center that div.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.