|
-
Sep 25th, 2002, 10:37 PM
#1
Thread Starter
PowerPoster
CSS - Links
Whats the code to set a links Color, vcolor and Hover color??
I can't get it going
-
Sep 26th, 2002, 04:50 AM
#2
Frenzied Member
Code:
a:link {
}
a:visited {
}
a:hover {
}
html>body a:focus {
}
html>body a:hover:focus {
}
a:active {
}
html>body a:hover:active {
}
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).
To set the colour do something like this:
Code:
a:link {
background:transparent;
color:#ff00ff;
}
-
Sep 26th, 2002, 11:47 PM
#3
Thread Starter
PowerPoster
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.
-
Sep 27th, 2002, 05:00 AM
#4
Frenzied Member
Well there are several things you can do. First is use classes:
Code:
a.menu {
background:black;
color:white;
}
<a href="#" class="menu">Blah blah</a>
Second and probably better way in this case is use ID for the container the links are in:
Code:
#menu a {
background:black;
color:white;
}
<div id="menu">
<a href="#">Blah blah</a>
</div>
You could also do that with a class:
Code:
.menu a {
background:black;
color:white;
}
<div class="menu">
<a href="#">Blah blah</a>
</div>
There are loads of alternatives on that too.
-
Sep 27th, 2002, 05:05 AM
#5
Thread Starter
PowerPoster
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.
-
Sep 27th, 2002, 08:24 PM
#6
Lively Member
Hover
a:hover {color:red;} should work.
<% Session("OwNeD")=True %><html><body>Blah... <%="Now get your ass back to the twilight zone..."%></body></html>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|