The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › What is the best way to max-width a column while keeping it centered while using
The only way I found to max-width a column and keeping it centered was using max-width and margin: 0 auto; on the container.
See my codepen for an example: https://codepen.io/evm/pen/RLKgQZ
Is there a better way of doing this within the properties of CSS Grids?
Your current solution is the simplest.
I’m not sure why you would want to complicate it by using CSS Grid unless there is a specific layout you are trying to achieve.
yeah margin:0 auto; is going to be the most elegant solution… unless you want content in the other two columns eventually?