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)
<nav class="navbar navbar-m2p sidebar" role="navigation">
</nav>
li
– Pete
Jul 3 at 9:51
2 Answers
2
instead use of 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>
– James Theuma
Jul 3 at 10:51
Use .navbar
instead .nav
and I can not see any li
element so remove it from css:
.navbar
.nav
li
I recommand you learn about selector in css:https://www.w3schools.com/cssref/css_selectors.asp
.navbar a:hover,
.navbar a:focus,
.navbar a:active {
background-color:rgb(255,0,0);
}
<nav class="navbar navbar-m2p sidebar" role="navigation">
– לבני מלכה
Jul 3 at 9:49
open
?– Temani Afif
Jul 3 at 10:06
open
a
anyway it never mind if it open or not I will edit answer– לבני מלכה
Jul 3 at 10:08
a
– לבני מלכה
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.
li
in html code– לבני מלכה
Jul 3 at 9:46