[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

CSS to control alink and vlink color

Posted on 2001-09-11
6
Medium Priority
?
920 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 80 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Suggested Courses

656 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