Hello,
Is there a setting to centre align the content in a container? or is this only done by CSS?
Hi there,
The container block does not have such a feature as it is meant to be a container of the other blocks.
You will need to use the inner block options that you use to make the text inside those blocks center aligned depending which block you use.
Container block does have the option for you to add a CSS class if you wish to use the CSS method.
Thanks.
Understood, Thank you. I have an image above a text link and I'm not able to align the image in the centre. Just the text is aligned to the center. How do I align the image?
Hi there,
I will need more info about the setup, maybe if you can share the front-end link I can check and give you a CSS code.
But in general, you would add a CSS class to the container and the Image block.
For example, if you have the class of "the-content" for the container and "the-image" for the image a CSS like this should do the trick:
.the-content {
text-align: center; /* Centers inline elements and text within the container */
}
.the-content .the-image {
display: block; /* Make the image a block-level element */
margin-left: auto; /* Auto margins work with block-level elements to center them */
margin-right: auto;
}
Thanks.
That worked perfectly! Thank you.