Current/Active Nav Bar Item Not Working? |
Current/Active Nav Bar Item Not Working? |
icanswim70 |
May 24 2019, 12:41 PM
Post
#1
|
Newbie Group: Members Posts: 15 Joined: 23-May 19 Member No.: 26,898 |
Hey everyone,
As the name suggests I have the respective classes coded to highlight the current page on the Nav bar, but it isn't working whatsoever. Is it missing something? *NOTE* This website is coded with HTML and CSS exclusively and would like to avoid Java if possible. Thanks I hope the screen shot attached... This post has been edited by icanswim70: May 24 2019, 12:44 PM |
pandy |
May 27 2019, 07:12 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
As the name suggests I have the respective classes coded to highlight the current page on the Nav bar Nope. I don't see anything like that. I wonder if you have misunderstood a:active? It doesn't mean a link to the current page. It's means the state a link is in for a brief moment exactly when it's clicked. If you just click as you normally do it's so brief it's hard to see. But if you make it extreme... CODE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>a:active</title> <style type="text/css"> body { background: black } a { color: white; font: bold 300% Verdana, sans-serif } a:active { color: red } </style> </head> <body> <p> <a href="http://htmlhelp.com">The WDG</a></p> </body> </html> |
Christian J |
May 28 2019, 06:07 AM
Post
#3
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Nope. I don't see anything like that. In particular, this selector: CODE li a.current won't do anything by itself, it's just an ordinary CLASS name (and there is no link using that CLASS in the HTML anyway). QUOTE I wonder if you have misunderstood a:active? It doesn't mean a link to the current page. It's means the state a link is in for a brief moment exactly when it's clicked. If you just click as you normally do it's so brief it's hard to see. Yes, it's mostly when a page takes time to respond you may notice. |
Lo-Fi Version | Time is now: 23rd April 2024 - 09:39 PM |