Mon, 2018-04-02 10:44
Hi.
I have a menu.
http://sheffieldtrauma.com/aboutmnew.html
I have a class which I want to you JUST for 'current page' on the menu.
So I have a class called main-nav-here
http://sheffieldtrauma.com/traumam.css
So. I've changed the background-color: (I won't be using red in the final release). That works.
BUT whatever I do to the color: it doesn't seem to work.
I expect this is simple, but it's doing my head in.
Any takers?
SW
Mon, 2018-04-02 14:55
#1
Specificity
This:
.main-nav a { border: 1px dotted blue; color: #2570e3; display: block; padding: 5px; text-decoration: none; }
overrides this:
.main-nav-here { background-color: red; color: #fff; }
Edit your selector to be .main-nav-here a {...}
gary
Wed, 2018-04-04 14:56
#2
Excellent. Ta.
Excellent. Ta.