Title: Please Help me with this navigation code?
Last modified: August 20, 2016

---

# Please Help me with this navigation code?

 *  [ibadullah](https://wordpress.org/support/users/ibadullah/)
 * (@ibadullah)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/please-help-me-with-this-navigation-code/)
 * Hello,
 * I want to set an active border-top: 2px colour and background colour for each
   button.
 * I made this code it’s just working Ho:Over Function
 * I want to add active and background colour How can I do this?
 *     ```
       .topnav li:nth-child(1) a:hover { border-top: 2px solid #CD0074; }
       .topnav li:nth-child(2) a:hover, a:active{ border-top: 2px solid #00cc00; }
       .topnav li:nth-child(3) a:hover, a:active{ border-top: 2px solid #FF0770; }
       .topnav li:nth-child(4) a:hover, a:active{ border-top: 2px solid #1b1bb3; }
       ```
   
 * I Tried this code for making active tabs but not working 🙁
 *     ```
       .topnav li a:active { background: white; color:#26b; text-decoration:none; }
       .topnav li:nth-child(1) a:active{ border-top: 2px solid #CD0074; }
       .topnav li:nth-child(2) a:active{ border-top: 2px solid #00cc00; }
       .topnav li:nth-child(3) a:active{ border-top: 2px solid #FF0770; }
       .topnav li:nth-child(4) a:active{ border-top: 2px solid #1b1bb3; }
       ```
   
 * When I try this code it just set background color for all buttons but I want 
   border-top colour as well and each tab has its different colour.
 * `.topnav a:active, .topnav li.current_page_item a, .topnav li.current_page_item
   a:visited { background: white;}`

Viewing 1 replies (of 1 total)

 *  Thread Starter [ibadullah](https://wordpress.org/support/users/ibadullah/)
 * (@ibadullah)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/please-help-me-with-this-navigation-code/#post-2195545)
 * Anyone can help me??

Viewing 1 replies (of 1 total)

The topic ‘Please Help me with this navigation code?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [ibadullah](https://wordpress.org/support/users/ibadullah/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/please-help-me-with-this-navigation-code/#post-2195545)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
