Center-block bootstrap class usage

I am going to build my tribute page here:

In order to align my picture in center i used .center-block class for the image as it have been mentioned here but it won’t be aligned center.

Currently i am using .text-center class in order to center my image

What is wrong with usage of .center-block?
Is it a bad practice to center the image with .text-center class?

Thanks in advance for your helps

rookie mistake.

you included bootstrap 4 instead of bootstrap 3 - which u’re learning here,
and that class doesn’t exist in that version.

replace with bootstrap 3.


Thanks for your help. it worked.
but it brings the question that is there any replacement for .center-block class in bootstrap 4?
or if i use bootstrap 4 i have to use .text-center like before.

of course there is a replacement…

FYI it’s mx-auto but you’ll forget that anyway, since u don’t code with bootstrap 4 yet.

1 Like

But you’ll remember that there is one ;). At which point you can check the docs like everyone else :sunglasses:.

1 Like

I had the same issue so thank you!