Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen boot bsod computer connection crash css dell display driver drivers email error ethernet excel firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition problem router slow software sound spyware trojan usb video virus vista windows windows vista windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
css link coding


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
JulieAsking's Avatar
Senior Member with 123 posts.
 
Join Date: Nov 2002
Location: Sydney
20-Aug-2007, 03:04 AM #1
css link coding
My understanding is that coding links in a CSS stylesheet happens in a certain order. My links are shown below in that order:

a:link {
color: #1C3467;
text-decoration: underline;
}

a:visited {
color: #594B29;
text-decoration: underline;
}

a:hover {
color:#3076B6;
text-decoration: underline;
}
This works fine in Internet Explorer. Using Firefox and Mozilla Seamonkey I am unable to get the visited link colour to show up and have no idea why.

Can someone please make a suggestion?

Thanks
Julie
AnotherCoder's Avatar
Junior Member with 5 posts.
 
Join Date: Aug 2007
Experience: Advanced
20-Aug-2007, 04:40 AM #2
CSS Applies in the following order:

1. Any CSS styles applied directly to an element.

Ex. <a style="color:green;" href="">My Link</a>

2. Any CSS styles applied in the HTML HEADER section of your document.

Ex. (Snippet)

<html>
<head>
<style>
body{background-color:red; }

</style>
</head>

3. Any CSS styles Applied from a seperate stylesheet with the link tag in your HTML HEADER SECTION

Ex.
<html>
<Head>
<link href="style.css" rel="stylesheet" type="text/css" />


In regards to your incompatibility issue with Mozilla, you may want to create a container for your "a" element and assign it an "ID"


#navigation a:visited {
color: #594B29;
text-decoration: underline;
}
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,705 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
21-Aug-2007, 07:51 PM #3
Quote:
Originally Posted by AnotherCoder
CSS Applies in the following order:
Thanks! I didn't know that.

Quote:
In regards to your incompatibility issue with Mozilla, you may want to create a container for your "a" element and assign it an "ID"
I got the same link color results in Firefox 2.0.0.6 on Windows and Maxthon2 (with IE 6 rendering engine) using the CSS she posted above untouched.

Julie, what are you seeing? Can you post the rest of your HTML (or a link to the page in question) to see if there is something else going on? Here is the test HTML I used that worked fine:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>link</title>
  <style type="text/css"> a:link {
color: #1C3467;
text-decoration: underline;
}
a:visited {
color: #594B29;
text-decoration: underline;
}
a:hover {
color:#3076B6;
text-decoration: underline;
}
  </style>
</head>
<body>
This is a <a target="_blank" href="http://www.thx.com/">link</a><br>
</body>
</html>
Peace...
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:13 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.