I have created a liquid sub-theme with Zenophile 6.x-2.0. In the second sidebar I created a block with a picture. When resizing the browser window, this picture should glide behind the node content. So I gave the block a z-index value which is lower than the node content. All looked fine while I was logged in as a user. When I logged out, the picture came to the front, overlapping the node content.

I have tried a z-index of -999, created a new block, even build a new site from scratch, but the problem stays. This problem does not occur in a fixed lay-out.

So when I log in, I can work with z-index, but logged out, the z-index does not seem to work.

Does anyone have a clue?

Comments

scrypter’s picture

IE can cause headaches with z-index. Logged in or not seems strange, maybe some other block or admin type menu/tabs is/is not showing causing this? For what its worth, I have had success with setting z-index AND position relative on the offending item AND ALL its parents. Tedious but desperation won out.

www.purpleoar.co.nz/scryptik - Javascript editor with syntax error checking
www.purpleoar.co.nz - Web development, Drupal consultancy

ecvandenberg’s picture

Thanks for your thought Scrypter.

I have tested it in the latest versions of FF, Chrome, Safari, Opera and IE. All gave the same behavior.
But I will follow your advice and report the results.

BE the change you want to see in the world.

ecvandenberg’s picture

After some study I found out that the z-index only works if the element it relates to has a position explicitly set to absolute, fixed or relative.

After doing so, the problem was solved. Still strange that things worked well when logged in.

BE the change you want to see in the world.

troe-lcog’s picture

Thanks for this! I was having the same strange results with z-index not working when logged out but working otherwise. Positioning did the trick for me!