Shopify themes, liquid, logos, and UX
Hi there, hope someone can help and thanks so much in advance.
I am using Impulse theme.
My menu dropdown columns are way too long, I would love to have them split into 2 columns. Can anyone please help me with some code, I have searched and searched to do it myself by no luck.
https://40565c-2.myshopify.com/
Password: LSOHC
Thanks a million
Solved! Go to the solution
This is an accepted solution.
Ok! Please try the below code.
@media (min-width:768px){
.site-nav__dropdown .medium-up--one-fifth {
display: flex;
flex-wrap: wrap;
width: 33.333333%;
}
.site-nav__dropdown .grid.grid--center {
display: flex;
align-items: start;
justify-content: center;
}
.site-nav__dropdown .medium-up--one-fifth .h5 {
width: 100%;
font-size: 18px;
font-weight: bold;
}
.site-nav__dropdown .medium-up--one-fifth div {
width: 50%;
}
}
Hi @aliciavterrible, Welcome to the Shopify Community!
You can split your menu dropdown columns into two columns using custom CSS.
Here's a simple code snippet to achieve that:
@media screen and (min-width: 768px) {
.site-nav__dropdown {
column-count: 2;
column-gap: 20px; /* Adjust as needed */
}
}
You can add this CSS code to your theme's Additional CSS or to your stylesheet. This code applies a two-column layout to your menu dropdown when the screen width is at least 768 pixels.
Feel free to adjust the column-gap value to control the spacing between the columns.
Hope this helps! Let me know if you have any questions or need further assistance.
Thank you, but the results are not as I hoped. Made the columns skinny but didn't break the long column into two separate shorter ones..
Specifically focusing on the HIRE and SHOP columns.
So we need to check the code.
It's working on the dropdowns that only have one level, but not working on the dropdowns that are showing multiple levels. There might be another line of code I can add in so it works on the subcategories?
Yes, you can add if you face still the same issue feel free to reach out to me at manshi@makkpress.com
Are you able to help me with the code on this discussion, please?
Please check with the below code:
details[open]>.site-nav__dropdown {
max-height: 250px;
overflow-y: scroll;
overflow-x: hidden;
}
This made the dropdown height reduce with scroll, but I was hoping for the long column to be split into two side by side columns. Can this not be done?
This is an accepted solution.
Ok! Please try the below code.
@media (min-width:768px){
.site-nav__dropdown .medium-up--one-fifth {
display: flex;
flex-wrap: wrap;
width: 33.333333%;
}
.site-nav__dropdown .grid.grid--center {
display: flex;
align-items: start;
justify-content: center;
}
.site-nav__dropdown .medium-up--one-fifth .h5 {
width: 100%;
font-size: 18px;
font-weight: bold;
}
.site-nav__dropdown .medium-up--one-fifth div {
width: 50%;
}
}
You did it!!!!! A million thank yous!!!
Thanks for your appreciation!
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024