Solved

CSS to control alink and vlink color

Posted on 2001-09-11
6
879 Views
Last Modified: 2008-02-01
I'm trying to find out if it is possible to control active and visited link color with an EXTERAL style sheet. I can currently control the link color with an internal style sheet but to aid in controlling multiple pages, I would like to do it with an external style sheet. My link is embedded into a table and I can control all aspects of it with one style tag except for the link color.

-seamil
0
Comment
Question by:seamil
  • 3
  • 3
6 Comments
 
LVL 5

Expert Comment

by:raizon
ID: 6475174
Like this.

A:Visited{color: #ff00ff;}
A:Active{color: #ff0000;}
0
 

Author Comment

by:seamil
ID: 6475213
That works if I have the style sheet imbedded directly into my page. I want add the link color control into an external style sheet. I have enclosed the style tag that I'm using below. What I'm looking for is the appropriate syntex to make it complatable with an external style tag.

td.link      { background-color: #000099; color: #FFFFFF; font-family: Arial, Verdana, Tahoma; font-size: 10pt; font-weight: bold; (syntex for vlink and alink here) }

-seamil
0
 
LVL 5

Expert Comment

by:raizon
ID: 6475218
You can't apply the visited or active elements to the links there.  But what you could do is

A.link { background-color: #000099; color: #FFFFFF; font-family: Arial, Verdana, Tahoma; font-size:
10pt; font-weight: bold;}
A:Visited.link{color:#ff00ff;}
A:Active.link{color:#ff0000;}

Then call that class in your href as so.

<td><a href="mypage.htm" class="link">My Page</a></td>
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:seamil
ID: 6475261
I have them as three separate lines in my external style sheet and it works great with IE 5 but is not working with Ns 4.73. What can you suggest so this can work on both? Or should I just embed the color control style tags in side of my pages?

-seamil
0
 
LVL 5

Accepted Solution

by:
raizon earned 20 total points
ID: 6475510
Netscape 4.73 doesn't support the visited, active, and hover in style sheets.  I don't believe visitted and active are supported until 4.76 but I could be wrong about that.  Only IE4.+ and NS6 support the A:Hover.

0
 

Author Comment

by:seamil
ID: 6476661
Thanks raizon!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CSS issue 8 40
Little bit of help styling my heading 3 32
Overflow: auto does not stretch with position: absolute 3 18
Fix a css menu for width 15 23
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question