Forums

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

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #260540
    nieternst
    Participant

    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?

    #260545
    Paulie_D
    Member

    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.

    #260635
    bearhead
    Participant

    yeah margin:0 auto; is going to be the most elegant solution… unless you want content in the other two columns eventually?

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.