Home > Software design >  I am trying to give my drop down background color, but its not implementing on it
I am trying to give my drop down background color, but its not implementing on it

Time:11-14

index.htm: index.html

styles.css: styles.css

.menubar .sub_menu {
  background-color: aqua;
}
<li class="fa fa-code">
  <a href="#skills"> Skills</a>

  <ul class="sub_menu">
    <li><a href="">Front-End</a></li>
    <li><a href="">Back-End</a></li>
    <li><a href="">Full-Stack</a></li>
  </ul>

</li>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

CodePudding user response:

try this.

.sub_menu {
  background-color: aqua;
}
<iframe name="sif2" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

CodePudding user response:

your CSS suggests that the class sub_menu should be under the class menubar. You can try removing that requirement

.sub_menu {
        background-color: aqua; 
}
  • Related