The admin menu toolbar misaligns sub items vertically, especially when the parent item is 2 lines, especially in a browser with a bigger font size.

2 pictures should explain.

Before fix:

before

After fix:

after

The problem is the weird, arbitrary -22px margin.

The fix is very easy:

html #admin-menu .dropdown li li {
  position: relative;
}
html #admin-menu .dropdown li li.expandable ul {
  margin: 0; /* undo the top -22px and left 160px */
  position: absolute;
  left: 160px !important; /* fixed width from admin menu, important because JS makes it 'auto' */
  top: 0;
}

That's what I added in a custom CSS to override admin menu's CSS.

I might make a patch later.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rudiedirkx’s picture

Title: Wrong submenu items offset » Wrong submenu items vertical position/offset
rudiedirkx’s picture

Version: 7.x-3.0-rc4 » 7.x-3.x-dev
Status: Active » Needs review
FileSize
1.02 KB
54.34 KB
62.51 KB

So simple. After patch:

Not toolbar:

admin menu, no toolbar

Toolbar:

admin menu, toolbar

frank.schalkwijk’s picture

I changed your patch a little to make it work with the adminimal theme.

Status: Needs review » Needs work

The last submitted patch, 3: wrong_submenu_items-2398413-3.patch, failed testing.

Tess Bakker’s picture

Status: Needs work » Needs review
FileSize
1.03 KB

New patch, same code only not corrupted.

Also tested the patch with RTL and LTR and 'Adminimal Admin Menu', works nice on Chrome and Firefox!

truls1502’s picture

Status: Needs review » Postponed (maintainer needs more info)
Issue tags: +postponed2w

I am sorry for no reply until now.

There are many issues regarding this module admin_menu which is a bit difficult for us to follow up since some of the issues might be already outdated, or is already fixed by the module or any other modules or itself core which means that the problem might no longer need to be fixed.

We can see that the issue has been created for a few years ago, I hope it is okay for you that I am postponing the issue, and give you around two weeks. If you still face the problem, could you tell us the step by step when until you get the error message or what is frustrated you, and a list of modules you are using related to admin_menu and a screenshot that might help us? So it makes us easier to reproduce your issue.

However, after two weeks with no feedback - we will close this issue. So in case, you noticed it after the issue is closed, do not hesitate to reopen it like and fill information which is mentioned above.

So before giving us a feedback, do you mind to test it again with our latest 7.x-3.x-dev?

Thank you for understanding! :)

truls1502’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
Issue tags: -postponed2w

This issue has been automatically marked as closed because it has not had recent activity after the last post.

However, if you or someone is still facing the same issue as described to the issue, could you please to re-open the issue by changing the status of the issue, and add an explanation with more details which can help us to reproduce your situation.

Again, thank you for your contributions! :)