I made a menu and now I'm trying to style a dropdown menu, but I can not talk to a
of .dropdown-content
. I noticed that .header-menu ul li a
is hierarchically above .dropdown-content a
, but I do not figure out how to change it. Here is the code:
Edit: I added the code here and will try to be more specific
I'm not able to talk to a
of class .dropdown-content
, as you can see the styles I put in this class are not working, a
is not with 60px
height, text color is not white, the text is not aligned to the left ...
I have tried to assign a class to a
and it did not work.
.header-menu {
height: auto;
text-align: right;
font-size: 0;
}
.header-menu ul li {
height: auto;
display: inline-block;
}
.header img {
margin-top: 20px;
}
.header-menu ul li a {
text-align: center;
color: #000;
font-size: 14px;
line-height: 60px;
padding: 20px 12px;
text-decoration: none;
}
.header-menu ul li:hover {
background: #fd1616; /*Vermelho*/
}
/*Dropdown Menu*/
.dropdown-content {
display: none;
position: absolute;
background: #111112;
width: 130px;
padding: 10px 0;
}
.dropdown-content a {
height: 60px;
color: #fff;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background: #fd1616;
}
.dropdown:hover .dropdown-content {
display: block;
}
<nav class="header-menu">
<ul>
<li><a href="ps4.html">PS4</a></li>
<li><a href="xboxone.html">XBOX ONE</a></li>
<li><a href="pc.html">PC</a></li>
<li class="dropdown">
<a href="outrosconsoles.html">Outros Consoles</a>
<div class="dropdown-content">
<a href="#">PS3</a>
<a href="#">XBOX 360</a>
<a href="#">WII U</a>
</div>
</li>
<li><a href="esports.html">eSports</a></li>
<li><a href="reviews.html">Reviews</a></li>
<li><a href="videos.html">Vídeos</a></li>
</ul>
</nav>