Jump to content

1.6 Top Menu Sub-Menu spacing issues...


Recommended Posts

Version 1.6.0.5

1 click upgrade from 1.5.x

 

Live site to see what I am talking about: https://www.swcoins.com

 

I am a coin selling site. I have a top menu that lists the types of US coins. When you hover over the parent element the child element on some of the sub categories are not spaced correctly. Specifically look at the US Dimes tab compared to the US Cent tab...

 

Any thoughts on how to fix this?

Link to comment
Share on other sites

@clever corporation In the "Top horizontal menu" module config window there is nothing about spacing or settings, just a combo box of what categories you wish to include.

@smartdatasof: You can view directly what I am talking about by going to swcoins.com  hover over US Cents then hover over US Dimes. The formatting is all jacked up.

Link to comment
Share on other sites

@swcoin

 

This is a bug on menu js. They divided all menu child with 5 if there is not ration good it break 

	$('.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());
	});
  • Like 2
Link to comment
Share on other sites

I think there is something wrong with the count in the Dimes submenu.

 

In the dimes submenu the first sub menu link starts with class="first-in-line-xs" (this class should be added to every second menu item acc. to the script smartdatasoft mentioned)
 

 

2014-03-19_0844.png

 

 

If you compare it with the submenu of Nickels where the alignment is correct you see that only the second menu item gets the "first-in-line-xs" class not the first

 

2014-03-19_0846.png

 

So for some reason the dimes submenu considers the first submenu item being the second.

Link to comment
Share on other sites

Yes this is what i mention that supper fish menu js have a little bug.

 

 

hi i did upgrade my presta from 1.5.6.2 to 1.6 without any error

 

 

but drop down menu isnt opening.could please check it

 

 

www.shop4play.com

 

 

Regards

Ps3z

Link to comment
Share on other sites

Hi,

 

I had the same issue.

 

I've updated the bug with the correct fix:

 

http://forge.prestashop.com/browse/PSCSX-1202

 

Hope that helps you too,

 

Peter

 

Update: To make it easier, I've attached the complete file. For default theme, replace this one:

themes/default-bootstrap/js/modules/blocktopmenu/js/blocktopmenu.js

blocktopmenu.js.zip

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

Posted file not working. For fixing this problem I change

 

    i = 0;
    $('.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');
    });

 

to

 

  $('.sf-menu > li > ul').each(function() {
  i = 0;
  $(this).children('li').each(function() { //add classes for clearing
  if ($(this).attr('id') != "category-thumbnail")
  { i++;
     if(i%2 == 1) $(this).addClass('first-in-line-xs');
    else if (i%5 == 1) $(this).addClass('first-in-line-lg'); }
   });
  });

 

in file  themes/default-bootstrap/js/modules/blocktopmenu/js/blocktopmenu.js

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

I'm not sure what your exact spacing issue was since there is no screenshot. I also had a spacing issue that the suggested code delete did not fix. The problem was that 2 links in the menu would appear as one link because there is no vertical spacing. Here is my solution.

 

PrestaShop 1.6.0.8

Open file themes/default-bootstrap/css/modules/blocktopmenu/css/superfish-modified.css

Find this code starting at line 148:

.sf-menu > li > ul > li {
  float: left;
  width: 20%;
  padding-right: 15px;

Change to:

.sf-menu > li > ul > li {
  float: left;
  width: 20%;
  padding-right: 15px;
  min-height:50px;
  margin-bottom:20px; }

Clear cache.

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...