[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

CSS link color stays blue & underlined onload of page.

Posted on 2005-04-29
3
Medium Priority
?
1,123 Views
Last Modified: 2008-01-09
I am using the following code to color my links and when I open the page in the browser the first time it shows the standard blue links underlined.  After I click on a link it resorts to the colors I have selected.  This occurs in both Netscape 7.0 and I.E.  How can I make the page come up nitially with the link basic unvisted state have the color I want it to be.

Here is the code:
  /* LINK STYLES */
     a:link{color:#524029;
       font-size: 12px;
       font-weight: bold;
         text-decoration: none;}
     a:visited {color: #ED7600;
           text-decoration: none; }
     a:hover {color:#994C00;
           text-decoration: underline;
           font-weight: bold; }
     a:active {color:#994C00;  
          text-decoration: underline; }      
0
Comment
Question by:a182612
3 Comments
 
LVL 1

Expert Comment

by:eaglewizard_1975
ID: 13896924
Looks correct, and seems to be working for me.  What does the whole page code look like?
0
 
LVL 30

Accepted Solution

by:
GrandSchtroumpf earned 500 total points
ID: 13897640
it's always better to also set the common properties on the "a" without pseudo class:

/* LINK STYLES */
a {
  color:#524029;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
}
a:link {
  color:#524029;
  text-decoration: none;
}
a:visited {
  color: #ED7600;
  text-decoration: none;
}
a:hover {
  color:#994C00;
  text-decoration: underline;
}
a:active {
  color:#994C00;  
  text-decoration: underline;
}
0
 
LVL 5

Expert Comment

by:Jan Louwerens
ID: 13898722
Maybe the initial page you are looking at is a cached version. And when you click on links, the new pages are updated.
Try refhreshing the initial page in your browsers (the css file needs to be loaded from the server and not the cache) and see if that fixes it.
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
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…
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 tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 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