[thelist] simple html css question

James Newbery jamesnewbery at yahoo.co.uk
Fri Jun 28 06:22:01 CDT 2002


 --- PeterV <peter at poorbuthappy.com> wrote: >
> Thanks! How do you do it if you want to declare
> these styles for certain
> links but not for others? Feeling dumb now!

1. Stick the css stuff in a tag:

<a href="somewhere.html" style="color:grey;
text-decoration:none">Your different link</a>

2. Make a class in the main style sheet:

<style type="text/css">
a.yourclass { color: blue; text-decoration: none; }
a.yourclass:hover { color: grey; text-decoration: none
; }
etc...
</style>

Then use:

<a href="somewhere.html" class="yourclass">Your
different link</a>

Use 2 if you need to have different styles for each of
the pseudo-classes (the hover, link, active, visited
definitions) and have more than one link to change.
Basically, use 2.

HTH,

Jim

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com



More information about the thelist mailing list