Whats the code to set a links Color, vcolor and Hover color??
I can't get it going :(
Printable View
Whats the code to set a links Color, vcolor and Hover color??
I can't get it going :(
The ones with html>body before them are ones that don't work in IE properly, but do in Mozilla. You can take out whatever ones you like, but try to leave them in the order above, otherwise you probably won't get the effect you're looking for (e.g. hover won't work).Code:a:link {
}
a:visited {
}
a:hover {
}
html>body a:focus {
}
html>body a:hover:focus {
}
a:active {
}
html>body a:hover:active {
}
To set the colour do something like this:
Code:a:link {
background:transparent;
color:#ff00ff;
}
What should I use for a certain number of links??
As I have my menu at the top of my page which is dark, so I've choosen a light link color(white), but the parts where there is text, has a black background, so I'm having to font="Blue" to make the links visible.
Well there are several things you can do. First is use classes:
Second and probably better way in this case is use ID for the container the links are in:Code:a.menu {
background:black;
color:white;
}
<a href="#" class="menu">Blah blah</a>
You could also do that with a class:Code:#menu a {
background:black;
color:white;
}
<div id="menu">
<a href="#">Blah blah</a>
</div>
Code:.menu a {
background:black;
color:white;
}
<div class="menu">
<a href="#">Blah blah</a>
</div>
There are loads of alternatives on that too.
How do I do the Hover color??
I tried hover:red
but it didn't work
I'm totaly new to CSS, apart from the user of the Hover Tag of course. :)
a:hover {color:red;} should work.