Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1409160

    Hi,

    I want to display a couple of widgets next to each other.

    Contact Information (#text-2)
    Legal Stuff (#text-4)
    Menu (#nav_menu-2)
    Contact Us (#text-3)

    I want Legal Stuff and Menu to display next to each other.

    I’ve been playing around with ChatGPT to try and configure the CSS and it come up with this:

    @media only screen and (max-width: 767px) {
    #footer .container {
    text-align: center;
    }
    #text-2 {
    width: 100%;
    float: none;
    box-sizing: border-box;
    }
    #text-4, #nav_menu-2 {
    width: 50%;
    float: left;
    box-sizing: border-box;
    }
    #text-4 {
    padding-right: 5px;
    }
    #nav_menu-2 {
    padding-left: 5px;
    }
    #text-3 {
    width: 100%;
    float: none;
    text-align: left;
    box-sizing: border-box;
    }
    }

    It doesn’t quite seem to work.

    The top widget is centred so that’s good. The bottom one is fine.

    I just want to middle ones to display side by side.

    Is this possible?

    Thanks,

    Harvinder

    #1409234

    Hey ballindigital,

    Thank you for the inquiry.

    You can add the following code inside the css media query for mobile view in order to align the first two widgets beside each other and adjust the position of the third widget (#nav_menu-2).

    #footer .flex_column:nth-child(1) .widget {
        width: calc(50%);
        float: left !important;
        clear: none;
    }
    
    #footer .flex_column:nth-child(2) #nav_menu-2 {
        width: 100%;
        float: none;
    }
    

    Please make sure to toggle or temporarily disable the Enfold > Performance > File Compression settings in order to ensure that the changes take effect.

    Best regards,
    Ismael

    #1409274

    This actually has aligned the top two widgets which is actually better.

    However.. Is there a way of making the second one align right?

    View post on imgur.com

    #1409275

    Also.. I’ve used this css code to make the bottom widget centred.

    #footer .flex_column:last-child .widget {
    text-align: center;
    }
    }

    The button doesn’t look that good.. Is there a way to make it full width instead?

    View post on imgur.com

    #1409276

    This is the css code that I’m using:

    @media only screen and (max-width: 767px) {
    #footer .container {
    display: flex;
    flex-wrap: wrap;
    }
    #footer .flex_column:nth-child(1) .widget {
    width: calc(50%);
    float: left !important;
    clear: none;
    }

    #footer .flex_column:nth-child(2) #nav_menu-2 {
    width: 100%;
    float: none;
    }

    #footer .flex_column:last-child .widget {
    text-align: center;
    }
    }

    #1409348

    Hi,

    Thank you for the update.

    To align the second widget to the right, just remove this css code:

    #footer .flex_column:nth-child(2) #nav_menu-2 {
        width: 100%;
        float: none;
    }

    Then replace it with:

    .flex_column:nth-child(2) #nav_menu-2 {
        float: right;
    }
    

    And to center align the contact form button, please add this:

    #top .wpcf7-spinner {
        position: absolute;
        bottom: 25px;
        left: 15px;
    }
    

    Again, please make sure to toggle or temporarily disable the Enfold > Performance > File Compression settings in order to ensure that the changes take effect.

    Best regards,
    Ismael

    #1409387

    Thank you! Almost there..

    I apologise for not being clear enough but what I meant when I said that I needed to align the second one, I want to align the Legal Information widget to the right on mobile view.

    #1409514

    Hi,
    To have the columns next to each other try changing the width: calc(50%); to 43% or less:
    Enfold_Support_2241.jpeg

    Best regards,
    Mike

    #1409606

    Hey Mike,

    Thanks for getting back to.

    What I mean is I want Legal Information to ‘align right’.

    As in text left align, centre, right align or justify.

    Does this make sense?

    <div style=”text-align:right”>This text will be aligned to the right.</div>

    #1409619

    Hi,
    Ok, first you will need to change the width: calc(50%); to 43% or less as above so the two columns will be side-by-side and then you could add this css for text-align: right;

    @media only screen and (max-width: 767px){
    #footer .flex_column:nth-child(1) #text-4 {
    	text-align: right;
    	margin-right: 0;
        margin-left: 20px;
    }
    }

    Please see the screenshot in the Private Content area of the expected results.

    Best regards,
    Mike

    #1409621

    Mike – amazing! It looks so good now! I really appreciate your patience :)

    #1409656

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Display Widgets side by side in Mobile View’ is closed to new replies.