denoland / website_feedback

For reporting issues & suggestions for deno.com and deno.land
9 stars 1 forks source link

Z-Index of navigation dropdown needs to be higher #33

Open mooxl opened 1 year ago

mooxl commented 1 year ago

Screenshot 2023-06-29 at 11 48 47

yosoypollito commented 1 year ago

I saw this yesterday, I did not find this GitHub before, but to avoid duplicating the problem, I will leave my contribution here 😄

The hamburger menu of the community label is under pricing cards when you hover it. I leave the way how to fix it and log the elements to target them using the browser to help the dev who fix it 🙂

fix #1: just remove the cards z index. fix #2: add relative and z index to nav bar. The nav bar normally should be over the other content.

const navWrapper = document.querySelector('nav').parentNode.parentNode;
const cards = document.querySelector('.relative .z-10');

const fixOne = ()=>{
    cards.classList.remove('z-10');
}

const fixTwo = ()=>{
    navWrapper.classList.add('relative');
// z-20 tailwind class is not in the compiled css so, i cant use it.
// navWrapper.classList.add('z-20')
    navWrapper.style.zIndex = '20' // 11 should be enough in this case.
}

// fixOne()
// fixTwo()
// Logs for easy access to elements :)
console.log(navWrapper);
console.log(cards);