I need to center the elements that are inside a box. I tried to achieve it by using justify-content:center; but it is not working. What else can i do? here is the css code. Notice that I have already used the justify-content:center; to bring the boxes to the center of the page
This is the output image
2
Answers
From the documentation that no one reads:
Therefore you should be using Flexbox, add:
Then whatever you want to do, which in the case of OP is:
Let’s say you have a box, it consists of a span tag with some text in it then do the following to center the text inside the box.