Can you help me for CSS
-
I use CSS and Visual Basic to implement a web site. I use this code: body#Linkbutton1 li.Linkbutton1 a:link{ color: #FFFFFF; background-color: #CC0000; } body#Linkbutton1 li.Linkbutton1 a:visited{ color: #FFFFFF; background-color: #660000; } body#Linkbutton1 li.Linkbutton1 a:hover{ background-color: #660000; color: #FFFFFF; } body#Linkbutton1 li.Linkbutton1 a:active{ background-color: #660000; color: #FFFFFF; } but the active selector dose not worked.
-
I use CSS and Visual Basic to implement a web site. I use this code: body#Linkbutton1 li.Linkbutton1 a:link{ color: #FFFFFF; background-color: #CC0000; } body#Linkbutton1 li.Linkbutton1 a:visited{ color: #FFFFFF; background-color: #660000; } body#Linkbutton1 li.Linkbutton1 a:hover{ background-color: #660000; color: #FFFFFF; } body#Linkbutton1 li.Linkbutton1 a:active{ background-color: #660000; color: #FFFFFF; } but the active selector dose not worked.
I think you may be misunderstanding what the active selector does. It is the state a link is in as the mouse (or keyoboard...I think) button is pressed down. In your case you have the same colour as the :hover state so you won't see any difference. The default (IE) behaviour for :active is to colour the link red, try using a different colour and you'll see what I mean. A couple of tips I thought I'd mention about your styles: - I can't see white on red being that easy to see, do you know how colour blind people will see it? - You may want to consider having a different colour for the :visited state. I know its nice to keep your links always the same colour, but depending on the links purpose its always best to let a user know where they've been (by purpose I mean if your link is performing a function rather than navigating the user, which in this case it looks like it might be, then having the same colour is probably OK)