|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
I use a stylesheet to define the style of 'a' i.e hyperlinks.
it looks something like this: a { color:white; font-family:verdana, arial, helvetica, sans-serif; text-decoration:none; } a:link {color:white;} a:visited {color:white;} a:hover {background-color:white; color:#808080; } This works great, but how do I explicitly change the style of other hyperlinks on the same page. They would typically be in a div. I have tried all kinds of things anc just can't get it to work. Thanks a lot...
__________________
Please turn over for witty signature. Chrisby |
|
#2
|
||||
|
||||
|
Give your hyperlinks a class:
<style type='text/css'> a.blueLink {color:blue;} a.blackLink {color:black;} </style> Then: <a href='#' class='blueLink'>blue link</a><br> <a href='#' class='blackLink'>black link</a> |
|
#3
|
||||
|
||||
|
Code:
<div id="foo"><a href="link.html">Link</a></div> Code:
#foo a:link Code:
<a class="foo" href="link.html">Link</a> Code:
a.foo:link
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#4
|
||||
|
||||
|
Thanks binky, that worked!
Sorted! ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > problem with CSS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|