简体   繁体   中英

How do I Change Navigation Background Color With CSS

This is the site in question: http://bnurowing.com

I would like to change every part of the current orange navigation background with red (#bf2323).

Can someone please tell me the lines of CSS code I need to replace the values of?

I've tried changing some of the values but when I hover over 'Committee & Coaches' (About > Our Club), it turns to this red color when I want it to stay black.

Any advice would be much appreciated!

Change #F24830 in style.css to:

(line 291)

.sf-menu > li > a:hover, 
.sf-menu > li.sfHover > a, 
.sf-menu > li.current-menu-item > a {
    background: none repeat scroll 0 0 #BF2323;
}

(line 310)

.sf-menu li li a {
    background: none repeat scroll 0 0 #BF2323;
}

Most modern browsers have an inbuilt DOM inspection tool , so you can see where and what styles are being applied on the specific element(s).

In

li.current-menu-item > a {
background: ##bf2323;
}

Try That.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM