Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-15-2013, 04:50 AM   PM User | #1
Pamela88
New to the CF scene

 
Join Date: Mar 2013
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Pamela88 is an unknown quantity at this point
My a:visited link is not working correctly.

I am working on an assignment for my html5 web development class and I am having trouble with my navigation bar the color that I assign to the a:visited link ends up being the background color for the whole navigation links and it doesn't change when one has been visited. Here is my code :

[#nav {
padding: 5px;
font-weight: bold;
float: left;
width: 160px;
padding-top: 20px;
padding-right: 5px;
padding-bottom: 5px;
padding-left: 20px; }
#nav a { text-decoration:none;
display: block;
text-align: center;
font-weight: bold;
border: 3px outset #cccccc;
padding: 5px;
color: #ffffff;
}
#nav a:link { color: #ffffff;
background-color: #000033; }
#nav a:visited { background-color: #90c7e3; }
#nav a:hover {border: 3px inset #666666;
background-color: #3399cc; } ]

So the visited link color is supposed to be #90c7e3 just like I have it written but instead it makes all of the navigation buttons that color and it does not change color when one of the links are visited. Also if I change that color it once again changes the whole navigation bar color rather then changing when a link is visited. I would really appreciate any help I could get because this is driving me a little crazy lol... :-)
Pamela88 is offline   Reply With Quote
Old 03-15-2013, 07:21 AM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,465
Thanks: 0
Thanked 499 Times in 491 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Presumably you have visited all those pages recently enough for the browser to still remember the visit.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is online now   Reply With Quote
Old 03-16-2013, 04:18 AM   PM User | #3
Pamela88
New to the CF scene

 
Join Date: Mar 2013
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Pamela88 is an unknown quantity at this point
Yes I have, but it just wont work right and I can not figure out what the problem is.
Pamela88 is offline   Reply With Quote
Old 03-16-2013, 06:38 AM   PM User | #4
KULP
Regular Coder

 
Join Date: Mar 2012
Posts: 166
Thanks: 5
Thanked 11 Times in 11 Posts
KULP is an unknown quantity at this point
Quote:
Originally Posted by Pamela88 View Post
Yes I have, but it just wont work right and I can not figure out what the problem is.
That is the answer to your problem, then. If every link is visited, the whole bar will show up as visited.
KULP is offline   Reply With Quote
Users who have thanked KULP for this post:
Pamela88 (03-17-2013)
Old 03-16-2013, 08:34 AM   PM User | #5
webdevs
New Coder

 
Join Date: Nov 2012
Location: India
Posts: 52
Thanks: 0
Thanked 3 Times in 3 Posts
webdevs is an unknown quantity at this point
Just change the visited color to different color then your navigation background color.
webdevs is offline   Reply With Quote
Old 03-17-2013, 04:00 AM   PM User | #6
Pamela88
New to the CF scene

 
Join Date: Mar 2013
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Pamela88 is an unknown quantity at this point
I have tried reloading it to the server and clearing my cache also I pulled up the website on google chrome and internet explorer but the visited link color wont change if I click on a link.
Pamela88 is offline   Reply With Quote
Old 03-17-2013, 06:20 PM   PM User | #7
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello Pamela88,
Give us a link to the test site, or post your entire code, so we can see what is overwriting your :visited styling or why it won't work.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:09 PM.


Advertisement
Log in to turn off these ads.