Centering picture links in a column

User 2806889 Photo


Registered User
64 posts

I've got 3 picture links in a column that span the width of the page. I'd like to center them equally horizontally. I've got them as inline blocks and no float. Can't seem to get them to center on the page. Can this be done or do recommend splitting up the 1 large column into 3 columns and placing each pic in a column?
User 232214 Photo


COO
827 posts

There are a number of ways (many actually :P — you can read about them all in our tips: http://rsd.coffeecup.com/tutorials/tips … tml#tip_10).

Flexbox would be my number one choice. Flexbox gives the ultimate layout control at any point (width). An (interactive) flexbox tutorial is included in RSD V1.5.

If they are already inline, setting text-align to center on the column should immediately do the trick for you too.

Hope this helps!
The future of web layout has arrived and it's called CSS Grid. CoffeeCup helps you to get ready with a free guide, the Grid Builder app plus cool demos & themes.
User 2806889 Photo


Registered User
64 posts

Perfect. Thanks.
User 2819400 Photo


Registered User
65 posts

Flex it baby...
User 2806889 Photo


Registered User
64 posts

I'll give flex a run. Thanks.

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.