Jump to content

problem with top horizontal menu


Recommended Posts

Hello friends,

I'v updated my presta from 1.5 to 1.6 - now testing everything.

Shop seem to work smoothly, BO & FO looks fine, but i have a problem with top horizontal menu.

 

It should look like this

post-215076-0-51723300-1395144801_thumb.jpg

 

But in some cases it looks like that:

post-215076-0-99039900-1395144588_thumb.jpg

 

When i add some subcategories - they go not in one line - but it goes under one another... 

 

I'v tried to remove the category, clear cache and so on, but then the same happens in other  (random) category... 

 

Is there any solution for this?

Thanks

Link to comment
Share on other sites

Hello, tjtang

 

The issue is that you have much menu element on your menu. And there left and right have much padding. So there is no room or space between your menu and search box. For that the element go down.

 

You need to either remove those menu element or give little space on padding. And made it little small . Then it will adjust the position.

Link to comment
Share on other sites

I have a similar problem with top menu where the dog products (menu1pic) menu is putting the rest of the categories below unlike the cat ones (Menu2pic).

 

this is a clone of an old back up of my main site i made and have upgraded from 1.4.7 to the latest version. So i am haveing a play round to see if it is worth upgrading my live site

 

url below

 

http://www.pets.justfurpets.co.uk

 

 

Cheers

 

Chris

post-295799-0-62985700-1395317104_thumb.jpg

post-295799-0-48574300-1395317115_thumb.jpg

Link to comment
Share on other sites

If you are referring to me i have just set Smart Cache for css  and smart cache for Javascript to no.

 

I presume this is what you mean?

 

I am not sure if it is just the number of charachters of the sub categories making it go below the first one

 

Cheers

 

Chris

Link to comment
Share on other sites

its because of clear:left; in:

.sf-menu > li > ul > li.first-in-line-lg {
clear: left;
}

The clear left is there for the last sub menu item but the count is wrong for some reason.

Actually the class .first-in-line-lg should be added to every fifth item of the current sub menu but the script takes all subcategories into account. And if ALL submenu items not only from the current parent category can be devided by five it adds a clear:left;

$('.sf-menu > li > ul > li:not(#category-thumbnail)').each(function(){ //add classes for clearing
        i++;
        if(i%2 == 1)
            $(this).addClass('first-in-line-xs');
        else if (i%5 == 1)
            $(this).addClass('first-in-line-lg');
            
            console.log(i + " .." + $(this).text());
    });

http://www.prestashop.com/forums/topic/315933-16-top-menu-sub-menu-spacing-issues/?p=1599105

Edited by prestamax (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 3 months later...
×
×
  • Create New...