Creating a Div max-width that is centered horizontally

I can’t find any page setting to set the max-width of, and also center horizontally, content such as a Div set to Grid inside 1 Col Structure Bloc. I must be missing this but can’t find it.

I resorted to writing some CSS to do this, but feel that this basic function must be hidden away somewhere.

Project settings you can set the width, unless I’m misunderstanding what you’re asking?

When ever I set max width I then set left and right margin auto. Keeps it centered.

Not page width. Layout width that might be 900px. I tend to build everything with 2 common widths say 900px and 700px when there is not enough content to use full page width or for emphasis.

You reminded me to try typing auto into the margin settings and that is of course accepted. I’ll kick myself for not trying that. I can get rid of the custom code now.

Many thanks.

1 Like