How can I fix the megamenu to have 5 columns per row?

Solved

How can I fix the megamenu to have 5 columns per row?

dreamtechzone_5
Shopify Partner
689 1 103

Hello Everyone!

I am trying to create a mega menu but when I have various columns (more than 8 or 10) I want each heading to move into a second row, rather than having to scroll across. I want to have 5 columns per row. Please help me. Thank you.

 

Store: https://urbanglowingstore.myshopify.com/

Password: Admin

 

What I want.

 

chrislitras_1-1618083470923.png

Accepted Solution (1)

CodingFifty
Shopify Partner
1007 151 176

This is an accepted solution.

Hi @dreamtechzone_5,

Go to Online Store, then Theme, and select Edit Code.
Search for base.css/theme.css/style.css file Add the provided code at the end of the file. 

 

@media (min-width: 769px){
.mega-menu__column {
    flex: 0 auto;
    margin: 21px 75px 0px 0px !important;
    display: block !important;
    flex: 1 1 calc(12% - 20px) !important;
    box-sizing: border-box;
}

.mega-menu__inner {
  display: flex;
  flex-wrap: wrap; /* Allows columns to wrap to the next row */
  gap: 20px !important; /* Adds spacing between columns */
  width: 100%;
}
}

 

CodingFifty_0-1737285683187.png

 

Coding Fifty || Shopify Partner
For any custom section queries, please visit: Fiverr Profile
Found my response useful? Like it and mark as Accepted Solution!
For additional discussions, reach out via: Email ID: codingfifty@gmail.com

View solution in original post

Replies 4 (4)

CodingFifty
Shopify Partner
1007 151 176

This is an accepted solution.

Hi @dreamtechzone_5,

Go to Online Store, then Theme, and select Edit Code.
Search for base.css/theme.css/style.css file Add the provided code at the end of the file. 

 

@media (min-width: 769px){
.mega-menu__column {
    flex: 0 auto;
    margin: 21px 75px 0px 0px !important;
    display: block !important;
    flex: 1 1 calc(12% - 20px) !important;
    box-sizing: border-box;
}

.mega-menu__inner {
  display: flex;
  flex-wrap: wrap; /* Allows columns to wrap to the next row */
  gap: 20px !important; /* Adds spacing between columns */
  width: 100%;
}
}

 

CodingFifty_0-1737285683187.png

 

Coding Fifty || Shopify Partner
For any custom section queries, please visit: Fiverr Profile
Found my response useful? Like it and mark as Accepted Solution!
For additional discussions, reach out via: Email ID: codingfifty@gmail.com
dreamtechzone_5
Shopify Partner
689 1 103

Great. Thank you very much. It worked.

Can it be kept like this?

Screenshot (19).png

CodingFifty
Shopify Partner
1007 151 176

Please mark the solution. @dreamtechzone_5 

Coding Fifty || Shopify Partner
For any custom section queries, please visit: Fiverr Profile
Found my response useful? Like it and mark as Accepted Solution!
For additional discussions, reach out via: Email ID: codingfifty@gmail.com
dreamtechzone_5
Shopify Partner
689 1 103

Done. Thank you. Can it be kept like this?

Screenshot (19).png