1

I am trying to convert a template to a custom drupal 8 theme and am having trouble with it covering the admin toolbar when logged in. I tried to inspect bootstrap when installed to see what was added but to no avail. I am trying to create a custom theme from scratch and not a subtheme. Any help is appreciated to find out what css that I can add that will push the content down while logged in?

Thanks

3

Drupal 8 admin toolbar z-index value is 502 only, but the bootstrap default static navbar z-index value is 1000, I think, Increase the admin toolbar z-index value would fix the issue,

.toolbar-oriented .toolbar-bar {
 z-index: 1001 /* or more */
}

Place that code in your theme's custom css file :)

  • 1
    i just figured it out. my body on my custom theme has no classes added to it when i log in, but when i change to bartik or bootstrap there are classes plus a padding-top that appears to be calculated from the toolbar height (79px). I need help figuring out how to add that when I switch to my custom theme. – Brad Jul 16 '16 at 19:43
  • 1
    Just copy html.html.twig file from classy theme and paste it in your custom theme folder.. Then you could add class directly in the body tag in the file – Leopathu Jul 16 '16 at 20:05

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.