Center elements with bootstrap templates_Portfolio page

Hi Everybody !

I’m working on the portfolio page https://codepen.io/IkeReiko/pen/oGyMMg
and I’m stuck with a thing, I can’t center elements “About” and “Contact”.
In the section “About”, I used a div .mx-auto to nest an image with .text-center but nothing changed.
For the section “Contact” with the social media links I don’t know how to get through it too…
Your help would be so appreciated :wink:

Thanks a lot !

The class text center is intended to center text inside a div tag, not images and other related elements. You’ll have to use CSS to accomplish this. This stackoverflow answer might give you an idea of what to change.

Hey. You were almost there but kinda got it backwards. The issue is you’re giving a fixed width to your div which you shouldn’t be doing and the text-center class should be given to the div itself, and not the image, like so:

<div class="col-xs-12 text-center">
  <img src="http://marieglaize.com/contact/Marie_Glaize_presentation.jpg">
</div>
1 Like

Great ! Thanks a lot @noyb, it’s so simple and it works perfectly fine :grinning:

Cool ! Thanks for this useful link :wink:

Glad I could help :slight_smile: