Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2008, 09:14 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default Visited link Issue

Hello CSS'ers

How can I enforce a visited link style on an anchor tag which opens a new window? This anchor tag looks like:

<a href="#" onclick="..." class="visLink">myTxt</a>

In my .css file I have:

a.visLink {FONT-FAMILY:verdana,ARIAL,helvetica,palatino,sans-serif;FONT-SIZE: 11px;color:#001271 ;font-weight:medium; text-decoration: none}
a:hover.visLink {color: #FFA500; text-decoration: none;}
a.visited.visLink {color: #999999; text-decoration: none;}

Trial an error has told me if there is not a page referenced in the 'href' part of the anchor tag the active ('a.visLink') style addopts the visited ('a.visited.visLink') style.

Very strange...Any ways around this?

TYIA

Wind is your friend
Matt
www.elitemarquees.com.au
__________________
Wind is your friend
Matt
 
Old May 14th, 2008, 12:01 PM
Authorized User
 
Join Date: Sep 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Matt,
I am looking for something similar. Did you resolve this issue by chance?

 
Old May 14th, 2008, 04:31 PM
Friend of Wrox
Points: 1,315, Level: 14
Points: 1,315, Level: 14 Points: 1,315, Level: 14 Points: 1,315, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , .
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I didn't follow the color thing really. You have styling neither for :link nor :active.

But why don't you have the URL to the pop-up page in the href? You should, color issues or not. Please read this page.:)
http://evolt.org/Links_and_JavaScrip...her_in_Harmony


--
http://yupapa.com
 
Old May 14th, 2008, 06:01 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

adamcherochak - if you build your anchor tag like <a href="#" its not possible to apply a visited style. The href need a page reference for it to stick.

;;;You have styling neither for :link nor :active.
Hi meow - I dont use these styles in my CSS. I am only interested in what I have used. After seeing your post I put them in place to see if it made a difference, it doesnt. I have always thought these, as are other styles, are optional.

I had a read of you link in relation to the <a href="#" thing. An interesting link, cheers for that. I have always used the #. Whats other opinions on this, is it a bad practice? The link you gave mentions this is very common practice. It doesnt say exactly why its bad practice, whats the issue with it?


Wind is your friend
Matt
www.elitemarquees.com.au
 
Old May 14th, 2008, 06:15 PM
Friend of Wrox
Points: 1,315, Level: 14
Points: 1,315, Level: 14 Points: 1,315, Level: 14 Points: 1,315, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , .
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Quote:
quote:Hi meow - I dont use these styles in my CSS. I am only interested in what I have used. After seeing your post I put them in place to see if it made a difference, it doesnt. I have always thought these, as are other styles, are optional.
If you are satisfied with browsers defaults that may or may not fit with the colors you do specify.

Quote:
quote:I have always used the #. Whats other opinions on this, is it a bad practice?
Yes. As is excplained on the page you just read.

--
http://yupapa.com
 
Old May 14th, 2008, 06:28 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I have never experienced any default styles like you suggest. EG the following two styles:

a.smLink {FONT-FAMILY:verdana,ARIAL,helvetica,palatino,sans-serif;FONT-SIZE: 11px;color:#999999; font-weight:normal; text-decoration: none}
a:hover.smLink {FONT-FAMILY:verdana,ARIAL,helvetica,palatino,sans-serif;FONT-SIZE: 11px; color:#cccccc; font-weight:normal; text-decoration: none;}

Are whats in place for the page footer navigation at www.elitemarquees.com.au

There are no styles being experienced other that the ones have asked for. How about your browser, can you see for example some default active link style?

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old May 14th, 2008, 06:44 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

As far as I can see the issue pointed out on the link you posted is a problem for users with javascript disabled. I have always had a bit of a lazy attitide towards these users. I see your point now, as mentioned above a useful read, cheers...

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old May 14th, 2008, 06:49 PM
Friend of Wrox
Points: 1,315, Level: 14
Points: 1,315, Level: 14 Points: 1,315, Level: 14 Points: 1,315, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , .
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

OK. Too lazy for Google too?

I guess you have to live with your problems then. Cheers!

--
http://yupapa.com
 
Old May 14th, 2008, 06:56 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

What do you mean to lazy for Google?

;;;I guess you have to live with your problems then. Cheers!
I dont claim to be a CSS expert, I only ever ask questions in this area. Hence the reason for my initial post and susequent questions.

You having a bad day meow?

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old May 14th, 2008, 07:21 PM
Friend of Wrox
Points: 1,315, Level: 14
Points: 1,315, Level: 14 Points: 1,315, Level: 14 Points: 1,315, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , .
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Not at all. I'm lazy too you see and since the problem isn't mine I don't have to deal with it. If you wait another month maybe someone else with a minute to spare comes along.

--
http://yupapa.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
a:visited link clearing vferratusco CSS Cascading Style Sheets 8 June 16th, 2010 11:20 AM
Trying to figure out how to work a link issue gene4455 VBScript 0 October 22nd, 2008 12:06 PM
Chapter 3 - a:visited not working VeganMan BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 April 3rd, 2008 12:31 AM
session based visited link style mat41 CSS Cascading Style Sheets 3 October 9th, 2007 12:39 AM
Have robots visited my site angrycat Apache Tomcat 2 February 22nd, 2005 09:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.