S. Drescher
S. Drescher

Reputation: 11

text-align: center; not working in Safari

I have this HTML

<section id="selection">
<a href="shop.html#shopBags"><img src="img/coverpictures/frontpage01.jpg"></a>
<a href="shop.html#shopAttachments"><img src="img/coverpictures/frontpage02.jpg"></a>
<a href="shop.html#shopAccessories"><img src="img/coverpictures/frontpage03.jpg"></a>
</section>

With this CSS

#selection{
  text-align: -webkit-center;
  text-align: -moz-center;
  word-spacing: 4vw;
  margin: 0;
}

#selection img{
  width: 25%;
  text-align: center;
}

I want the three links/images to be centered in the div. It works fine in Chrome and Firefox, but in Safari the pictures float right. How do I fix this?

Upvotes: 0

Views: 6008

Answers (1)

DPS
DPS

Reputation: 1003

Try this

#selection{
    display:flex;
    justify-content:center;
    }

Upvotes: 2

Related Questions