Hi all, I have a css a:active problem where I can't get the page to recognise that is is active and mark the CSS accordingly. Can you please advise? I have two places where the a:active part is applied, but neither is working!
This is css for text links in general across the site:
a:link {
color:#ccc;
text-decoration: none;
font-weight: normal;
-webkit-transition: color 400ms ease;
-moz-transform: color 400ms ease;
-o-transition: color 400ms ease;
transition: color 400ms ease;
}
a:hover {
color: #f00;
}
a:active {
color: #666;
}
And this is specific to a very simple nav menu:
ul.nav {
list-style: none;
border-bottom: 1px solid #F00;
margin-bottom: 40px;
padding-bottom: 40px;
}
ul.nav li {
line-height: 27px;
color: #fff;
}
ul.nav a {
font-size: 29px;
padding: 0px 0px 0px 0px;
display: block;
text-decoration: none;
color: #fff;
}
ul.nav a:hover {
color: #f00;
}
ul.nav a:active {
color: #999;
}
Thanks in advance.
Mat
Active = onClick. It doesn't stick on successive pages.
What you want is a persistent page indicator on site wide menus
http://alt-web.com/Articles/Persistent-Page-Indicator.shtml
Nancy O.
Cheers Nancy, I didn't realise that active meant onClick, I've always assumed it meant the page that was active. I have never used active before, and use a method similar to what you proposed, but thought it was convoluted and was getting a bit frustrated at having to find a long way around. I now know different!
Thanks
North America
Europe, Middle East and Africa
Asia Pacific