I use the great Theme Zeropoint for a small WEB Site. It works perfect for my needs except the alignment of the Primary Links. The 2nd Level menus are not aligned with the primary links 1st Level.0

There is a margin either left or sometimes right. It does not depend on which position the primary link 1st level menu resides.

See the attachment for the screenshot how it looks like.

What can I change in the CSS or TPL to align the 2nd level menu according to the corresponding 1st level menu?
Many thanks for your help.

Chris

Comments

cstreit’s picture

Component: Code » User interface
Category: support » bug
florian’s picture

Status: Active » Closed (works as designed)

This is by design. The 2nd Level menus is centered by the down arrow of the 1st level. This allow to easily move the menus left-center-right and uses the Drupal native menu system and not a block to place in a region.

cstreit’s picture

Thanks for the info. Now I see...

ozhovnir’s picture

StatusFileSize
new17.86 KB

I am having this issue but can't quite figure out what I need to change in the css to left align the 2nd Level menu to its parent. I would like to have the left border of the child UL aligned with the left border of the parent LI element. Any way to do this?

Your help is much appreciated!

WildKitten’s picture

I wanted to align 1st and 2nd level menus so I wrote the code. If you have 3rd or 4th level menus, they'll stayed just like they were without this code. If anyone still needs it, here it is. The only thing you need to do is to add it in your page.tpl.php in head tag. Also adjust first margin parameter for your need.

<script type='text/javascript'>
$(document).ready(function(){
	$("#navlinks > ul").addClass('main-ul');
	var integer = 0;
	$("#navlinks ul.main-ul > li.expanded").each(function(){
		var text = $(this).text();
		var this_width = $(this).outerWidth();
		integer = integer + 1;
		$(this).children('ul').addClass('sub-ul-'+integer);
		$('.sub-ul-'+integer).attr('style', 'margin:23px 0 0 -' + this_width + 'px'); 
	});
});
</script>