2 replies [Last post]
benny
Offline
Enthusiast
Last seen: 13 years 6 weeks ago
Joined: 2004-08-24
Posts: 64
Points: 0

Hi there...its me again...

I use the following code for my navigation, but the active links do not work...

#navi2 a {
background-color: #8FCDF9;
border-left: 2px #FF0000 solid;
color: #000000;
display: block;
padding-left: 5px;
text-decoration: none;
width: 87px;
}
* html #navi2 a {
width: 87px;
w\idth: 94px;
}

#navi2 a:hover {
border-left: 2px solid #8B0000;
color: #808080;
}
#navi2 a:active {
border-left: 5px solid #8B0000;
color: #808080;
}

#navi2 ul{
list-style-image: none;
list-style-type: none;
margin: 0px;
padding: 20px 0px 0px 15px;
}

#navi2 ul li{
margin: 0px;
padding: 1px 0px 0px 0px;
}

When i press a link and hold the mouse-button, the 5px dark-red border from the active link is displayed, but when i release the button and change the site, the links looks normal again, and not active as it should.

Thank ya all,
greets
ben

briski
briski's picture
Offline
Elder
London
Last seen: 8 years 24 weeks ago
London
Timezone: GMT+1
Joined: 2004-02-16
Posts: 1066
Points: 0

#navi2 a:active won't work

As far as I know the Active Pseudo class it only used when the link is active, as in when you are in the process of clicking it, ie holding down your mouse button.

I'm not sure what you're trying to achive, do you want the menu item for the page you're on to be highlighted? if so you'll have to give it a class or something I imagine and then create a seperate rule for that.

benny
Offline
Enthusiast
Last seen: 13 years 6 weeks ago
Joined: 2004-08-24
Posts: 64
Points: 0

#navi2 a:active won't work

Hi!
Yes i wanted to achieve that the nav-point of the actual page is highlighted.
It can't work with a:active, because every nav-point links to a new site, and this site doesn't know which nav-points should be active.

You are right, creating a new rule for the active points is a solution.
Thx for your answer!
greets ben