RE: link
by "David Wagner" <dwagner(at)kevric.com>
|
| Date: |
Tue, 4 Apr 2000 14:43:13 -0500 |
| To: |
<hwg-style(at)hwg.org> |
| In-Reply-To: |
|
| |
todo: View
Thread,
Original
|
|
Katherine Carrington
>
> I have an external style sheet that in part, covers the a: links**
>
> In the html, I have one line of text in a paragraph that
> requires me to change the a:link color, which is currently guided by the
> external style sheet.***
>
> Is it proper to change this a:link color inline?****
>
Well, it depends on what version of HTML you are writing and if you are a
seperation of style and markup purist. If you are a purist or writing
ISO-HTML or other modern markup languages, use an entry in your stylesheet
to select the link. From the context of your sample, it looks like you may
always want links within regular paragraphs (as opposed to those in TABLEs
or navigation DIVs) to be black, so use the following.
P A, P A:visited {color:#000000;}
/*IE5 requires setting these two to override all pseudo-classes assigned
previously*/
/*The corrrect CSS follows, but does not work.
P A {color:inherit;}*/
/*If you want all links in JUST section1 to be black, use*/
.section1 A, .section1 A:visited {color:#000000;}
If you really just need the one link changed, assign it an id and select it
by that.
A#abcd123 {color:#000000;}
-------
<a id="abcd123"...></a>
If you prefer to style inline, add a style attribute to your A element.
<a style="color:#000000;"...></a>
There is no need for the FONT element, and it is best not to use it.
HWG hwg-style mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.