Site logo

[Resolved] Flexbox – help with aligning items centre

Home Forums Support [Resolved] Flexbox – help with aligning items centre

Home Forums Support Flexbox – help with aligning items centre

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1570165
    Baz

    Hi, I’m new to all this Flexbox malarkey 🙂

    When I want an item centred without padding or margins, I normally add:

    margin-left: auto;
    margin-right: auto;
    max-width: 400px;

    This allows the object to float centrally within say a 800px container.

    Is there a better way to achieve this with Flexbox CSS?

    I don’t have a live website yet to show you an example, just inquisitive.

    Thanks

    #1570208
    David
    Staff
    Customer Support

    Hi there,

    that is still the most valid way of cantering a smaller container within a larger parent container.

    #1570223
    Baz

    Thanks David, I was worried that my CSS was out-of-date for the new Flexbox version of GP Theme 🙂

    #1570249
    David
    Staff
    Customer Support

    You’re welcome

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.