Changing the color of the 'active'
Changing the color of the 'active'
The active color is still White even after rgb is changed.
.nav li>a:hover,
.nav .open>a:hover,
.nav li>a:focus,
.nav .open>a:focus,
.nav li>a:active,
.nav .open>a:active {
background-color: rgb(255, 0, 0)
instead use of Use I recommand you learn about selector in css:https://www.w3schools.com/cssref/css_selectors.asp<nav class="navbar navbar-m2p sidebar" role="navigation">
</nav>li
Think you need to learn about basic css selectors - do a tutorial, it will save you a lot of time and questions. But the main problems I see is you have nothing with a class of nav and no li so obviously your css is not styling anything
– Pete
Jul 3 at 9:51
2 Answers
2
nav
use navbar
and inside navbar a
nav
navbar
navbar a
.navbar a:hover,
.navbar .open>a:hover,
.navbar span>a:focus,
.navbar .open>a:focus,
.navbar a:active,
.navbar a:active {
background-color: rgb(255, 0, 0)<nav class="navbar navbar-m2p sidebar" role="navigation">
</div>
</nav>
I would also like to make a hover to the other sub-menus
– James Theuma
Jul 3 at 10:51
.navbar
instead .nav
and I can not see any li
element so remove it from css:.navbar
.nav
li
.navbar a:hover,
.navbar a:focus,
.navbar a:active {
background-color:rgb(255,0,0);
}<nav class="navbar navbar-m2p sidebar" role="navigation">
tell me if you have any li in html code...
– לבני מלכה
Jul 3 at 9:49
what are you repeating the selector with open
?
– Temani Afif
Jul 3 at 10:06
open
you right... if he want apply style to a
anyway it never mind if it open or not I will edit answer
– לבני מלכה
Jul 3 at 10:08
a
@TemaniAfif edited thanks for turned my attention...
– לבני מלכה
Jul 3 at 10:10
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
I can not see any
li
in html code– לבני מלכה
Jul 3 at 9:46