1

Drupal 7

The toolbar is sticky at the top even you scroll down the page.

How can I make it unsticky at the top?

Thanks.

4

The fixed position is hard-coded into the toolbar.css file included with the core module.

To override it add the following to a CSS file that you're including with the admin theme:

#toolbar {
  position: static !important;
}

body.toolbar, body.toolbar-drawer {
  padding-top: 0 !important;
}

The !important declarations may or not be necessary depending on the order of inclusion...try without it first, and if it doesn't work, try adding it.

| improve this answer | |
  • so the sticky effect is made by the css not javascript? – gilzero Apr 30 '12 at 12:48
  • 1
    @gilzero Yep, it's simply done with position: fixed on the #toolbar element. The body needs padding when this is the case, but doesn't if the element is not fixed, hence the need to remove it when making the toolbar non-fixed – Clive Apr 30 '12 at 12:50
  • 3
    "auto" is not a valid value for position in CSS 2.1 or CSS 3. The default value is "static". – mpdonadio Apr 30 '12 at 12:57
0

You can use Seeds Toolbar for Drupal 8.

https://www.drupal.org/project/seeds_toolbar

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.