I would like to center the color boxes and have same space between them.
Any idea or suggestions are much appreciated. Thanks !
I would like to center the color boxes and have same space between them.
Any idea or suggestions are much appreciated. Thanks !
You can put the colored boxes in a container and use margin: 0 auto; on the container. Or you can figure out the percentage space that the boxes take up then apply margin-left to the first to move everything over or padding-left to the box that they are in, in the picture.
Use flexbox and specifically justify-content: space-between.
You can center inline-block child elements by setting text-align: center on the parent. But you will have to overwrite the alignment on any elements you do not want to be center-aligned (like the h2).
But I agree about using flexbox as well.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.