Sign in to follow this  
Kit the Human

Help Z-Index not working as expected

Recommended Posts

I am so confused.

 

https://www.pirate-rp.site/index.php

 

You need to use a mobile view, so inspect element away!

 

Open up the menu up top. The menu sits on top of everything except the header's H2 and the forum images. Why??

 

ul.mobile-menu-content {
		position: relative;
		z-index: 9999;
		padding-top: 2rem;
		background: rgba(44, 105, 99, 1);
		list-style-type: none;
		text-align: center;
		font-size: 2rem;
		flex-direction: column;
		justify-content: space-between;
	}

 

I can fix it by getting rid of the relative positioning on both the header and forum images, but they're positioned for a reason. I give them a z-index of 1, and they still appear on top.

 

I thought that maybe flex was the problem, but removing flex had no effect.

 

I've tried absolute and fixed positioning for the mobile menu content, with no change.

 

I'm using Opera. I checked with Firefox, issue still present.

 

Erm, anything else I can try? Am I missing the obvious?

 

Edited by Kit the Human

Share this post


Link to post
Share on other sites
Awards

Ooo you're right! The welcomeblock variable (with the member links like UCP etc) actually works in the footer, I didn't know that.

 

So I threw the code into the bottom of the footer and it's fixed everything! ....Except for the header link. I don't fancy putting it into a bunch of templates so I'll rethink my header instead. Thank you!

  • You're Welcome 1

Share this post


Link to post
Share on other sites
Awards

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.