Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I added
#admin_menu {
display: none;
}
in the css to hide it by default.
Comment | File | Size | Author |
---|---|---|---|
#6 | admin_menu_dropdown-allow-menu-to-show-by-default-1259182-6.patch | 320 bytes | izmeez |
Comments
Comment #1
cosmodrom CreditAttribution: cosmodrom commentedThanks for the nice ninja trick anyway, it is very helpful as I'm constructing absolute positioned elements over the site.
Comment #2
Josephnewyork CreditAttribution: Josephnewyork commentedAdd this in your CSS, that way it works the way it was suppose to even if "hide by default" was not checked...
Comment #3
Josephnewyork CreditAttribution: Josephnewyork commentedI noticed that there is a CSS file with the module... That means that the code must be added to admin_menu_drop.css and this is not a fix situation, but incomplete code. ALSO, the css that is there isn't correct either and has no effect. The heiarchy of CSS also depends on the complexity of the selector hence overwriting the margin-top body.adm_menu_hidden has no effect and must be body.admin-menu.adm_menu_hidden. Its a full rewrite, so I'm not attaching a patch. Please review:
admin_menu_drop.css
Comment #4
izmeez CreditAttribution: izmeez commentedThe fix in #3 works as expected.
It includes two components.
The correction to the existing css file is a duplicate of #2047537: Body margin did got get reset properly
The fix from #2 works for when the configuration "hide by default" box is not checked, allowing the menu to be shown as default.
Comment #5
izmeez CreditAttribution: izmeez commentedI have changed the title to reflect what this fix actually doing.
Comment #6
izmeez CreditAttribution: izmeez commentedHere is the fix rolled as a patch against the current 7.x-3.x branch