Use a CSS (Cascading Style Sheet) to control the color of your links.  Here
is an example...

<style type='text/css'>
<!--
@charset "iso-8859-1";
A {text-decoration: none; }
A:link {text-decoration: none }
A:visited {text-decoration: none }
A:active {text-decoration: none }
A:hover {text-decoration: underline; }
-->
</style>

Using the above will do several interesting things:

1.  Since no colors are specified, all links will always be blue (unless
overridden by an inline style reference).  I could just as easily specify
the color (or even a background image) for the links like so...
A {text-decoration: none; color: red; }

Now all my links will be Red, BUT ... (see number 2 )....

2.  Because of the "text-decoration: none" attribute, the links will not be
underlined on the page except... (see number 3)...

3.  Because of the last line the links will display an underline when the
mouse is positioned over them.  This is a nifty way to do something
'scripty' without writing a lot of messy script.  This same thing can be
done for image swapout, table cel backgrounds, etc.

If you aren't familiar with CSS, I suggest you check out
http://www.w3.org/Style/CSS/Buttons/.  You won't regret it!


Joel R. Cochran
Director of Internet Services
VamaNet.com
(800)480-8810
mailto:webmaster@vamanet.com


> -----Original Message-----
> From: Justin Houchin [mailto:jhouchin9@charter.net]
> Sent: Wednesday, June 05, 2002 4:16 PM
> To: web400@midrange.com
> Subject: [WEB400] Links
>
>
> This is a multi-part message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> Is there a way when creating an A href link that you can keep
> the color
> from changing when it is clicked?
>
> Justin Houchin
> Programmer
> ReliaTek, Inc
> jhouchin9@charter.net
>
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
> To post a message email: WEB400@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/web400
> or email: WEB400-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/web400.
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.