Visted Message Link Color - Change

Is message board greying out your hair (at least what's left of it)? Let us help you here
Locked
ronmerk
Posts: 10
Joined: Wed Jan 11, 2006 4:29 pm

Visted Message Link Color - Change

Post by ronmerk »

Script URL:
Version of script: Latest
Version of PHP: 5.*
Hosting company: Paid hosting - all php scrips work
Have you searched THIS FORUM for your problem: Yes
(if not please do before posting)
If so, what terms did you try: color, link,links, visited

Write your message below:

Hi Everyone:

Mboard is awesome!! I've been able to work out most conf issues or I'm in the process of doings os, but one that I can't seem to find is:

What/where do I place code to make a "visited" message link appear in a different color for the users? They are use to having the link change color after they have read a message.

Thks in advance.

Ron
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello Ronmerk,

The style can be set in the style.css file
The link colors are defined by the A styles.
Existing are:

Code: Select all

A {
	color : #0084BE;
	text-decoration : underline;
}

A:HOVER {
	color : Red;
	text-decoration : none;
}

A.smaller {
	font-size: 10px;
	color : #0084BE;
	text-decoration : underline;
}

A.smaller:HOVER {
	font-size: 10px;
	color : Red;
	text-decoration : none;
}
To set the style for visited, add

Code: Select all

A:visited {
	color: #FFFFFF; 
	text-decoration: none;
}

A.smaller:visited {
	color : #00FF00;
	text-decoration : none;
}
You can change the color and text-decoration to whatever you want.
The style A.smaller:visited does not have to be added. If you don't add it the style from A:visited will be used (because the smaller class is a subclass from A).

Greetings,
Henrie
ronmerk
Posts: 10
Joined: Wed Jan 11, 2006 4:29 pm

Thank You

Post by ronmerk »

Hi Henrie:

Thanks so much for the info. I'll try that later today when i get home from work.

I kind of thought it would be in the CSS file, but didn't have a clue what the coding should be.

Thks again, and I'll let you know how it works out.

Ron
ronmerk
Posts: 10
Joined: Wed Jan 11, 2006 4:29 pm

No Luck

Post by ronmerk »

Here's what i added to the CSS file - Did NOT change the link color after it was visited. Any ideas???


A {
color : #0084BE;
text-decoration : underline;
}

A:HOVER {
color : Red;
text-decoration : none;
}

A:visited {
color : Blue;
text-decoration : none;
}

A.smaller {
font-size: 10px;
color : #0084BE;
text-decoration : underline;
}

A.smaller:HOVER {
font-size: 10px;
color : Red;
text-decoration : none;


Ron
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello Ronmerk,

I just tested, it works for me (tested in firefox 1.5 and internet explorer 6.0).
If you don't get it to work post a link to your site so i can see myself what is wrong.

I noticed that all the links were affected. To just change the links to the threads, add this code instead of the previous suggested code.

Code: Select all

li A:visited {
color : blue;
text-decoration : none;
}
Greetings,
Henrie
ronmerk
Posts: 10
Joined: Wed Jan 11, 2006 4:29 pm

Working I Think

Post by ronmerk »

Hi Henrie:

I had to add:

A.smaller:visited {
color : #00FF00;
text-decoration : none;
}

Once I did this, it all seemed to work

You can check the site at:
http://www.victoriabariatricsurgery.com ... mboard.php

Thanks for your help
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello ronmerk,

I looked at your style.css file and these are all the A entries.

Code: Select all

A {
	color : Blue;
	text-decoration : underline;
}

A:HOVER {
	color : Red;
	text-decoration : none;
}

A:visited { 
   color: #969696; 
   text-decoration: none; 
} 

A.smaller:#969696 { 
   color : #00FF00; 
   text-decoration : none; 
} 


A.smaller {
	font-size: 10px;
	color : #969696;
	text-decoration : underline;
}

A.smaller:HOVER {
	font-size: 10px;
	color : Red;
	text-decoration : none;
}
The code you mentioned in your last post is not present.
The code that does the work is

Code: Select all

A:visited { 
   color: #969696; 
   text-decoration: none; 
} 
Maybe you did not reload your page after you changed the style.css file, or maybe it was cached in your browser so you should clear the cache. I don't know what happened but I do know you have to change the style for A:visited and not for A.smaller:visited.

Greetings
Henrie.
Locked