Active/Click state for links in Nav Bar

FTBvideo

New Member
Hi-

I am very, very, very new to web design and understand very little.

I did not physically design my site. Someone else did. he had issues with the Click state of my links and has gotten involved in other stuff and hasn't been around to fix this.

So I look to you all.

Right now my links are charcoal in an unactive state. They turn green when you hover over them and I want the selected link to stay green when on the page. That isn't happening. It just reverts back to Charcoal as soon as the cursor is moved from it.

Here is the code form the Stylesheet:

ul#navBar li {float: left;list-style: none;padding:0;margin: 0px;position:relative;right:40px;bottom:5px;}
ul#navBar li:after {content:'|';font-size: 16px;font-weight: normal;margin: 0px;}
ul#navBar li:last-child:after {content:'';}
ul#navBar a:link {color: #333333;text-decoration: none;font-size: 16px;font-weight: normal;padding: 3px 5px;display:inline;}
ul#navBar a:visited {color: #333333;text-decoration: none;font-size: 16px;font-weight: normal;padding: 3px 5px;display:inline;}
ul#navBar a:hover, ul#navBar a.active:hover, ul#navBar a.active:hover, ul#navBar a.active:hover {color:#8abf56;}
ul#navBar a:active, ul#navBar a.active, ul#navBar a.active {color:#8abf56;}
ul#navBar li ul li a {padding: 4px 5px !important;display: block;}
ul#navBar li ul li:after {content:'';}

I don't know what is repetitive or missing. Can anyone help?

thank you.

My site is www.fadetoblackproductions.com
 

Attachments

  • navbar code.jpg
    navbar code.jpg
    41.2 KB · Views: 16

chrishirst

Well-Known Member
Staff member
:hover only applies while the cursor is actually over the element.

:active only applies while the cursor is over the element AND the left mouse button is held down

If you want the current URL link to stay "active" you will have to use javascript to set the anchor element with a class rule.
 
Top