0

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>
Rana
  • 2,500
  • 2
  • 7
  • 28
  • Does this answer your question? [Background-color for ul/div element not rendered](https://stackoverflow.com/questions/31152285/background-color-for-ul-div-element-not-rendered) – DevZer0 Nov 13 '21 at 06:23

2 Answers2

2

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; 
}
Rifky Niyas
  • 1,737
  • 10
  • 25
DevZer0
  • 13,433
  • 7
  • 27
  • 51
  • But I have tried removing that. But it still doesn't work out. I've done like you have suggested. But it's the same result No. – Usman Khan Nov 13 '21 at 12:03
  • But I have tried removing that. But it still doesn't work out. I've done like you have suggested. But it's the same result No. – Usman Khan Nov 13 '21 at 12:03
2

try this.

.sub_menu {
  background-color: aqua;
}