Skip to main content
This topic is closed to new replies. Start a new post to keep the conversation going.
Jon Fritz
Jon FritzCorrect answer
Community Expert
Mar 11, 2020 4:06 PM UTC

Restricted to the code you are currently using, adding margin:0 auto and a set width to the .row class will center its content, but honestly, using floats, margin and padding to center things is now "the hard (old) way".

Look into CSS Flexbox, this type of thing is very simple using that method. This site has some decent basic information on how to use flex in your page...

https://www.w3schools.com/css/css3_flexbox.asp

1 reply

Jon Fritz
Community Expert
Jon FritzCommunity ExpertCorrect answer
Community Expert
Mar 11, 2020 4:06 PM UTC

Restricted to the code you are currently using, adding margin:0 auto and a set width to the .row class will center its content, but honestly, using floats, margin and padding to center things is now "the hard (old) way".

Look into CSS Flexbox, this type of thing is very simple using that method. This site has some decent basic information on how to use flex in your page...

https://www.w3schools.com/css/css3_flexbox.asp

Translate