-2

I'm using the Admin menu in Drupal 7. I recently started developing a Zen sub-theme for my website and discovered something annoying.

My theme's heading background is a simple 200px high image (a brown rectangle) that repeates horizontally:

body { background: transparent url(../images/background.gif) repeat-x center top; }

I created the theme while I was logged in and achieved this (first image on website). Happy as I was, I logged out and noticed with anger that my lay-out had changed (second image on website)!

I suspect that the admin menu 'pushes' all the content on my website to the bottom, while the background stays put. Is there a way to 'push the background to the bottom' aswell, so that I don't have to log out every time to see what happened when I changed my CSS theme code?

closed as off-topic by Jeroen, Mołot, Елин Й., kiamlaluno Jul 20 '14 at 10:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on programming, PHP, SQL, etc. that do not relate directly to Drupal are off-topic here, but can be asked on Stack Overflow." – Jeroen, Mołot, Елин Й., kiamlaluno
If this question can be reworded to fit the rules in the help center, please edit the question.

1

I also faced same problem with Zen theme and I think there is no professional fix for that.

Although, I have used the attributes not-logged-in and logged-in class'es (which will be available in body tag) to differentiate whether or not the user is logged and placed/adjusted my css accordingly.

0

Most themes provide div wrapper for their main content. In Skeleton Theme it's <div id="wrap"> Simply use it (or create it if you don't have one yet) to attach backgrounds and position elements, and tools that needs space outside it would not interfere.

  • I more or less solved my problem by disabling 'Adjust top margin' in the section Configuration > Administration > Administration Menu. The upper side of my icon is now covered by the toolbar, but that's not a very big deal. – Jeroen Jul 21 '13 at 12:07

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