1
I’m trying to create a menu that doesn’t move independently of the user scrolling on the page using position fixed
.
However I am having a problem with transparency, whenever the menu meets with other content, it becomes transparent.
Before I used a menu with position absolute
, and the menu didn’t even look transparent. I googled tried some things but I couldn’t solve, I put opacity: 100%
but also did not solve.
Follow the css code from my menu, and images demonstrating what happens. Does anyone know how to solve this problem?
div#menu
{
width: 100%;
background-color: rgba(60,60,65,1);
box-shadow: 0px 0px 10px rgba(0,0,0,.5);
position: fixed;
top: 0px;
left: 0px;
}
div#menu ul
{
text-align: left;
}
div#menu li
{
display: inline-block;
padding: 0px 0px 0px 0px;
margin: 0px 25px 0px 25px;
}
div#menu a
{
font-family: Arial, sans-serif;
font-size: 16pt;
text-decoration: none;
color: white;
}
div#menu a:hover
{
color: rgba(50,50,255,1);
text-decoration: underline;
}
I put z-index: 1; and it even worked, I didn’t know the z-index yet, thank you very much for the help.
– DaniloMB