On 23 Oct 98, Kathy E. Gill wrote:
> trick question -- not possible except (maybe?) w/CSS ... or with images as
> links.
Yes, it's certainly possible to define different link colors with CSS, although
the procedure is a little different than with most other CSS elements.
The 'A' element has so-called pseudoclasses belonging to it, corresponding
to the HTML body attributes 'link', 'alink' and 'vlink'. But you can add a
normal class to any of the pseudoclasses, thus changing its display
properties.
To define the above attributes ('link', 'alink' and 'vlink') in CSS, use this
syntax:
A:link { color: blue } /* unvisited link */
A:visited { color: red } /* visited links */
A:active { color: lime } /* active links */
If you wanted to define an additional color for A:link (for instance, if you
wanted links internal to a site to be one color, and external ones a
different color, you would add a class to the pseudoclass:
A:link { color: blue }
A.external:link { color: yellow }
The corresponding HTML would read:
<a href="some.html">internal link</a>
<a class= "external" href="some2.html">external link</a>
The class name doesn't have to be 'external', of course. The author
defines class names as required.
You can also change link colors without CSS using <font color= > inside
your <a href> tags, but this doesn't work in a lot of browsers.
-----------
Brent Eades, Almonte, Ontario
E-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
Town of Almonte site: http://www.almonte.com/
Business site: http://www.federalweb.com
____________________________________________________________________
--------------------------------------------------------------------
Join The Web Consultants Association : Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------