Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Split responsive menu into two coloumns

This is the website I'm working on http://www.jokerleb.com/ and I'm using this https://responsive.menu, the free version. it will appear on devices 400px and smaller.

How to split its columns into 2 like so?

enter image description here

Don't know how to edit the CSS to make it look right, if it's possible in the first place.

like image 410
Lynob Avatar asked Mar 18 '26 20:03

Lynob


2 Answers

Adds these lines to your code :

@media screen and (max-width: 400px){
    #responsive-menu-container{
        width:100%;
    }

    #responsive-menu {
        display: flex;
        flex-wrap: wrap;
    }

    #responsive-menu li{
        width:50%;
    }
}

It works for me.

like image 152
Richard Foucaud Avatar answered Mar 21 '26 11:03

Richard Foucaud


You'll want to use media queries, so something like this should do it for you:

<style>
@media screen and (max-width: 400px) {
     #responsive-menu-container li.responsive-menu-item {
         width: 50%;
         display: inline-block;
     }
}
</style>

Note that you may need to play around with this CSS a little, since widths will vary based upon padding, margin and the display type. If you provide a sample of your CSS (or better yet a fiddle) I can help you more exactly.

The lines above make it look like this once the category button is clicked: enter image description here

If you'd prefer the thing go the whole width, include this in your @media option as well:

#responsive-menu-container {
    width:100%;
}
like image 31
Bing Avatar answered Mar 21 '26 09:03

Bing



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!