Shopify themes, liquid, logos, and UX
Hello,
I have been trying for hours to figure this out. Two of our drop down menus are too long and we need to split them into two columns. Is there any help or advice? my theme is Debut theme
Solved! Go to the solution
This is an accepted solution.
Hi,
Follow this:
1. Go to Online Store->Theme->Edit code
2. Asset->theme.scss->paste bellow code in bottom of file
#SiteNavLabel-solvents { width: auto; } #SiteNavLabel-solvents ul { column-count: 2; } #SiteNavLabel-solvents ul li {-webkit-column-break-inside: avoid;page-break-inside: avoid; break-inside: avoid; }
Note: I have given this css base on current theme.
laballey.com
This is an accepted solution.
Hi,
Follow this:
1. Go to Online Store->Theme->Edit code
2. Asset->theme.scss->paste bellow code in bottom of file
#SiteNavLabel-solvents { width: auto; } #SiteNavLabel-solvents ul { column-count: 2; } #SiteNavLabel-solvents ul li {-webkit-column-break-inside: avoid;page-break-inside: avoid; break-inside: avoid; }
Note: I have given this css base on current theme.
Hi sorry to jump on this post but i am trying to achieve the same for the drop down named 'Brands' on our website giftsatbliss.co.uk , i would be grateful if you could advise how to split the list into 3 or 4 columns,
Thanks
Follow this:
1. Go to Online Store->Theme->Edit code
2. Asset->theme.scss->paste bellow code in bottom of file
.site-nav > li:nth-child(6) .site-nav__dropdown{ column-count: 3;}
Note: This css give base on just console so if you ad and menu then change nth-child(6) value.
@Jasoliya wrote:Follow this:
1. Go to Online Store->Theme->Edit code
2. Asset->theme.scss->paste bellow code in bottom of file
.site-nav > li:nth-child(6) .site-nav__dropdown{ column-count: 3;}Note: This css give base on just console so if you ad and menu then change nth-child(6) value.
Thank you so much for that Jasoliya it has been driving me mad for days 🙂
Hi,
This is Joycy from House of Jay and We are using Grid Theme (Pixel Union), can you please advise on how we can edit the code to split it into columns as we keep adding more brands and he dropdown is already very long. Our website www.houseofjay.com. Thank you.
Add this css in Asset->theme.scss file at bottom:
@media only screen and (min-width: 767px) { .navigation-menu .has-dropdown:nth-child(7) .navigation-submenu { column-count: 2; } }
Note: i have give solution just by console so if you add any menu before "Brands" then change 7 to its sequence number.
Thank you so much. It's really a big help..
Please use below code to split your long column into small ones:
$("#SiteNav li ul").each(function(){
var len = jQuery(this).find('li').length;
if(len > 9){
$.fn.extend(
{
list2Columns: function(numCols)
{
var listItems = $(this).find('li'); /* get the list data */
var listHeader = $(this);
var numListItems = listItems.length;
var numItemsPerCol = Math.ceil(numListItems / numCols); /* divide by the number of columns requires */
var currentColNum = 1, currentItemNumber = 1, returnHtml = '', i = 0;
var classname = $(this).parent().attr('id');
/* append the columns */
for (i=1;i<=numCols;i++)
{
$(this).parent().append('<ul class="column list-column-' +classname+ i + '"></ul>');
}
/* append the items to the columns */
$.each(listItems, function (i, v)
{
if (currentItemNumber <= numItemsPerCol){
currentItemNumber ++;
}
else
{
currentItemNumber = 1;
currentColNum ++;
}
$('.list-column-'+classname+currentColNum).append(v);
});
$(this).parent().addClass('expended-div');
$(this).remove(); /*clean previous content */
}
});
$(this).list2Columns(3);
}
});
Thanks for the quick response, but that didn't work when added to theme.js.
For just "Brands" Menu
Hi
I have similar issue. My site name is: oztechbuddy.com.au
could you plese have a look and help please?
Regards,
Roni
1. Go to Online Store->Theme->Edit code
2. Asset->theme.scss->paste bellow code in bottom of file
#SiteNav .site-nav__item:nth-child(1) .site-nav__dropdown-container:nth-child(1) .meganav__list{column-count: 2;} #SiteNav .site-nav__item:nth-child(1) .site-nav__dropdown-container:nth-child(1) .site-nav__dropdown{width:auto;}
Hi Jasoliya
My first long menu converted into a multi-colmon dropdown menu. But other long menus still long.
Shouldn't that code going to convert all long menus of the whole site?
Apple > Case. This is working fine.
Apple > W&F Case. Its still a long menu
Any idea why its happening?
Kind regards,
Roni
If you add code for conman then it will convert all menu to 2 column even 3 link in menu. for that we have to add one by one css for all long menu
You saved me once again. Thanks for explaining. I converted all of my long menus into 2-colmun menus.
Hi there!
Was wondering if you would be able to help me make my drop down menus 2 columns in the Blockshop theme?
Add this css in asset->theme.sss file at bottom, and like if work
.x-menu--level-1--container li:nth-child(5) .x-menu--level-2--list,.x-menu--level-1--container li:nth-child(6) .x-menu--level-2--list{column-count: 2;}
Hello Jasoliya
can you please help. I need 2 column for dropdown menu. The website is https://www.kisnagems.co.uk and its for the last menu heading "more gemstone jewelry"
thanks
add this css in theme.scss file at bottom and like if work:
.site-navigation .navmenu-depth-2 .navmenu-link{padding: 0.4375rem 0rem 0.4375rem 0.5625rem;} .site-navigation li:last-child .navmenu-submenu{column-count: 2;}
thanks for this, it works
Hey Jasoliya,
The "Shop" submenu is too long and it'd like to make it 3 columns. Can you help me? The url is https://weld-usa-development.myshopify.com/
Thank you!
I ended up changing the design to avoid the problem, but thank you.
I am having this issue as well with our menus. We have quite a long list of brands. Would you be so kind as to guide me on our site dev site?
pipedream-dev.myshopify.com
password for site is pipedreamdev
Our current theme is "Showcase"
User | RANK |
---|---|
155 | |
127 | |
80 | |
73 | |
69 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023