Rasmus Eldblad
Rasmus Eldblad

Reputation: 1

how do i align 3 images in the center of this div?

i've looked all over the internet and found answers on how to do this but it doesn't seem to work out for me anyway. Excuse me for the mess I'm still in the early stage of the learning process... BUT I wanna align these 3 images in the center of this div, center of the page or whatever you wanna call it. I want the soulnight poster in the middle, profit lab to the left and the overheard at poker to the right.

The code I have now:

enter image description here

What the site looks like now:

enter image description here

Upvotes: 0

Views: 6353

Answers (1)

Stix
Stix

Reputation: 11

You can use display:inline-block; and add text-align:center in the container.

.container{text-align:center;}
.container img{display:inline-block;}

Working example here: https://jsfiddle.net/u3hvd2g4/1/

Upvotes: 1

Related Questions