Text not aligning to center

Hi,

I tried a few things but the text is not aligning to center.

Don’t know what’s wrong.

Here are some things I’ve done and how it looks:

Thanks

Hi there,

Which page are you trying to set this up? Would you mind providing the direct link to that thread so that we can check it?

Thank you.

Please check the secure note I sent.

Hi there,

Please set the left and right margin of the text element to auto.

Hope this helps.

That helps, thank you!

Just strange why I have to do that.

Hi @Refresh,

You have inserted a div instead of a text or paragraph. To center a div you should have a CSS margin left and right auto and width.

Hope it clears your mind.

Thanks.

Interesting @nico.

Although I’d like to, I don’t get to choose div blocks—only elements.
And the text block was certainly one of the elements. :thinking:

Hi there,

Apologies for the confusion, you will have to add the auto margins to the text element because the text element is wrapped in a div by default and you can control the width and max width of the div container of the text element using the Width & Max Width.

Without the margin left and right auto, the div will be displayed by default from the left of its main container while following the width that was set to the element that is why the text element was showing up in a short div with centered text due to what you have set in the settings. This is also where @nico’s explaination about centering a div applies.

Hope this helps.

Aah, thanks @Jade for clearing it up. I understand it better now.

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.