I can see it proper working, where are you adding code?
i cant see you have added code
I can see it proper working, where are you adding code?
i cant see you have added code
is it possible to make a multi column in motion theme?
send me store url and menu name
Best regard
How to add multi-column to navigation menu in Boost 2.0 Shopify theme?
Store preview:
Hi the theme is motion
Hi @ML2391
Note: Its for âSHOP BY CATEGORYâ menu only
.site-nav > li:nth-child(4) ul{ column-count: 2;}
.site-nav > li:nth-child(3) ul{column-count: 2;}
Note: you have to make your menu text smaller its too big now.
Instead of having theme.css, I have a theme.js (entered the code and it didnât work).
Would this have to be converted to JSON?
add in any css file
thanks it does work.ive tried making text smaller but the width is too wide it possible to open up a menu heading (knowldge centre) to a page of clickable tiles instead ?
for that need code changes, but you can do smart and fast way by adding this
.site-nav__dropdown-link{ overflow: hidden;text-overflow: ellipsis;}
.site-nav__dropdown>li{max-width: 365px;}
hi thanks ,it did work.
but now ive moved nav bar layout and the wrong column is double drop down.
for example CBD campaign should be 1 single column and Knowledge centre should be 2 or 3 rows if possible .
https://thehemp-hacienda.co.uk/
best regards
hamish
I successfully added this 2 column code to my theme.scss.liquid file, however it does not work on mobile. I cannot scroll or see half of the menu items in my Products by Saint drop down on mobile. Do you have solution that would work there? PioPrints.com Thanks
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(â
/* 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.
Hopefully this thread is still alive:
How would you go about creating multiple columns within the brands dropdown for optical-heights.com?
Thank you for your time!
@Jasoliya (Iâm sorry if this is rude)
you have already column in menu .. in which menu want column?
I solved the issue, thank you though!
Sorry about that!!!
Hello @Jasoliya
How would you add a multi-column dropdown for Shop on https://ri3qvpcf1y067i4l-51982074037.shopifypreview.com for the âAlbumsâ > âBoy Groupsâ and âGirl Groupsâ menu?
Thank you in advance for any possible help!!
add this css:
.nav .dropdown-submenu:nth-child(2) .dropdown-menu,.nav .dropdown-submenu:nth-child(3) .dropdown-menu{column-count: 2;}