Title: Span Coding for Color Changing in Active Modul
Last modified: January 11, 2022

---

# Span Coding for Color Changing in Active Modul

 *  [Alex](https://wordpress.org/support/users/expofield/)
 * (@expofield)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/span-coding-for-color-changing-in-active-modul/)
 * Hello there!
 * I want to change the active color of my main menu pages/categories putting the
   code in the navigation menu for each of them. I found this code:
 * <span style=”color:#a57a6b;”>Home</span>
 * Could you please help me to make it work only for the active/selected page?
 * Thank you in advance!
    -  This topic was modified 4 years, 4 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Samuel O.](https://wordpress.org/support/users/wpcoworker/)
 * (@wpcoworker)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/span-coding-for-color-changing-in-active-modul/#post-13679066)
 * Hi Sandra,
 * I am assuming this is your website – [https://www.expofield.com/](https://www.expofield.com/)
 * Please go to the dashboard & add the following CSS to `Appearance > Customizer
   > Additional CSS`
 *     ```
       #menu-main-menu li.current-menu-item a {
           color: #a57a6b;
       }
       ```
   
 *  Thread Starter [Alex](https://wordpress.org/support/users/expofield/)
 * (@expofield)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/span-coding-for-color-changing-in-active-modul/#post-13679092)
 * Hey Samuel!
    Yes, that’s it! I tried to change it through CSS, but it’s not working.
   I tried other codes, too, but nothing works. That’s why I’m trying to change 
   it through the Navigation Label and the code I’ve got seems to work, but I want
   it to work only in active module.
 *  [Samuel O.](https://wordpress.org/support/users/wpcoworker/)
 * (@wpcoworker)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/span-coding-for-color-changing-in-active-modul/#post-13679171)
 * It should work. Can you please try updating the CSS with below:
 *     ```
       #menu-main-menu li.current-menu-item a {
           color: #a57a6b !important;
       }
       ```
   
 *  Thread Starter [Alex](https://wordpress.org/support/users/expofield/)
 * (@expofield)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/span-coding-for-color-changing-in-active-modul/#post-13680308)
 * I tried that, too, but nothing
 *  [Prabhat](https://wordpress.org/support/users/prabhatrai/)
 * (@prabhatrai)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/span-coding-for-color-changing-in-active-modul/#post-13689518)
 * Hey [@expofield](https://wordpress.org/support/users/expofield/),
    There is no
   stylesheet available in the theme you are using. Try the below code, add it in**
   Appearance > Customizer > Additional CSS**:
 *     ```
       .current-menu-item a{
            color: #a57a6b !important;
        }
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Span Coding for Color Changing in Active Modul’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [Coding](https://wordpress.org/support/topic-tag/coding/)
 * [color customization](https://wordpress.org/support/topic-tag/color-customization/)
 * [main menu](https://wordpress.org/support/topic-tag/main-menu/)
 * [primary menu](https://wordpress.org/support/topic-tag/primary-menu/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [Prabhat](https://wordpress.org/support/users/prabhatrai/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/span-coding-for-color-changing-in-active-modul/#post-13689518)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
