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;}
[No bumping, please.]