Is it possible to have a section that has side margins, but also has a max-width and is centered? Seems like the auto margins which allow it to be centered also eliminate side margins. We use a section border so we can’t use padding instead since it pads the interior content but not the border.
Hi @co50,
Thank you for reaching out to us. Are you trying to center align the content in a section? If yes then first inspect your section and then under Formatting select center Text Align (see screenshot)


Hope this helps!
Nope - I am trying to center an entire section that has a section border. But the section also needs to have side margins and have a max-width.
Hi There,
It’s a bit tricky but it is possible, set your sections left and right margin to auto and add this to Section’s Element CSS area.
$el.x-section {
max-width: calc(1500px - 8em);
}
@media (max-width: 1500px) {
$el.x-section {
margin-right: 4em;
margin-left: 4em;
}
}
Since you did not give numbers, this assumes that your margins are 4em on both sides and the max-width is 1500px, then 8em is the total sides margin.
Hope it helps,
Cheers!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.