Superfish (Navbar): second Navbar under parent

Superfish (Navbar): second Navbar under parent

Hi there,

I used the searchfunction but couldn´t find an answer.
I´ve integrated jquery superfish plugin (NAVSTYLE!) in joomla. No Problem
so far.

I positioned the list items of the first Nav. Row via css with different gaps between the li´s.

f.e:
  1. .item-103{
  2.     margin-right:45px;
  3. }
  4. .item-104{
  5.     margin-right:9px;
  6. }

What I´m lookin for is a way to position the submenu not on the very left under the first NavRow, but centerd under it´s parent link (Opener from the first navigation row).

I thought I could code this by jquery offset. Means calculate the x position of the parent element then the width of the submenu and then set the x value of the submenu. But this fails at  first step as I don´t get correct values from offset?? Any tips?

  1. var p = $(".item-104").offset();
  2. alert (p.left);
Gives me a wrong value for:

  1. <ul class="menu sf-menu sf-navbar">       <li class="item-101"><a href="/test.com/home" >Home</a></li>
          <li class="item-102 deeper parent">
          <a href="/contact/" >contakt</a><ul><li class="item-109"> ...

for better understanding, an image what I´m looking for (submenu centered under its parent link) :





thanks for help,

tony