Site logo

[Resolved] Footer widgets justify on desktop, and centred in a column for tablet/mobile

Home Forums Support [Resolved] Footer widgets justify on desktop, and centred in a column for tablet/mobile

Home Forums Support Footer widgets justify on desktop, and centred in a column for tablet/mobile

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1964194
    Michael

    Hi

    I’ve got lost with the CSS on this one and hope you can help. I have two Footer Widgets and I want them to justify with space-between (in flex terminology) on a desktop view, but to stack in a column and be centred on a tablet/mobile view.

    Could you advise how I need to change my CSS?

    #1964212
    David
    Staff
    Customer Support

    Hi there,

    looks like the justify space between is working on desktop.
    For tablet and mobile, change this CSS:

    @media (max-width: 1024px) {
        .inside-footer-widgets {
            flex-direction: column;
            justify-content: center;
        }
    }

    to:

    @media (max-width: 1024px) {
        .inside-footer-widgets {
            flex-direction: column;
            align-items: center;
        }
    }

    Thing to note with flex is the justify and align are relative to the flex-direction.
    So when you switch to flex-direction: column; you actually use align to justify the items, because the flow has changed 🙂

    #1964336
    Michael

    Hi David

    Perfect! Many thanks for the fix and the learning point too – very useful!

    #1964342
    David
    Staff
    Customer Support

    Glad to be of help!

    #2028221
    Dan

    Hi David,

    I used the CSS code suggested above, but it doesn’t work for me. I look for the same setup model on footer widgets of GeneratePress, all (Title, contained) justify on center with breakpoint 1024px.
    Can you help me, please?

    #2028265
    Ying
    Staff
    Customer Support

    Hi Dan,

    Can you open a new topic and link us to your site? 🙂

    #2028289
    Dan

    Hi Ying,

    The new topic number is #2028288.

    #2028296
    Ying
    Staff
    Customer Support

    Answered there 🙂

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