PDA

Click to See Complete Forum and Search --> : Link colours (or is it colors?)


Michael
Aug 2nd, 2000, 08:41 AM
... but being English I will spell it the proper way (colours), and not the lazy way (colors) ...

I can quite easily specify link, hover, active and visited colours to be applied to links by using a style sheet, but these colours are applied to every link on the page.

Can I specify the colours to be used for individual links, or groups of links?

I would prefer to use a style class, if possible.

Thanks in advance.

Michael
Aug 2nd, 2000, 02:53 PM
C'mon guys !!! Please help me!!!

If what I ask is not possible will someone please tell me that it is not possible!!!

Michael
Aug 3rd, 2000, 10:14 AM
It's well over 24 hours since I first posted this and still no answer!!!

Is it possible to specify link/hover/visited colours for an individual link?

billyo
Aug 4th, 2000, 10:23 PM
You say "proper" I say inefficient. You have to use extra letters for a dipthong that isn't even pronounced! Just like Aluminum. Do you say Al-you-min-ium? or just Al-uh-minum? And if the former, then how do you spell it? Anyway, here's what you're looking for.


<html>
<head>
<style><!--
a.limey, table.limey a
{
color:006600;
background-color:eeffee
}
a.fruit, table.fruit a
{
color:000066;
background-color:eeeeff;
}
a.limey:hover, table.limey a:hover
{
color:eeffee;
background-color:006600;
}
a.fruit:hover, table.fruit a:hover
{
color:eeeeff;
background-color:000066;
}
--></style>
<!-- note that a:hover only works with IE, and NetScapes'
css support is buggy at best.-->
</head>
<body background="/images/bground.gif" bgcolor="#ffffff" text="#000000" marginheight="0" topmargin="0">
<a class=limey href="#">Bloody</a><br>
<a class=fruit href="#">Hell</a>
<!-- or if you have a lot of links, and don't want to specify class individually...
the expression following the comma in the above style declaration is the hot ticket.
Oh yes, for this stuff to work you have to spell color the lazy way.-->
<table class=limey><tr><td>
<a href="#">Bugger</a><br>
<a href="#">Bugger</a><br>
<a href="#">Bugger</a><br>
<a href="#">Bugger</a><br>
<a href="#">Bugger</a><br>
<a href="#">Bugger</a><br>
</td></tr></table>
<table class=fruit><tr><td>
<a href="#">Bugger</a><br>
<a href="#">Bugger</a><br>
<a href="#">Bugger</a><br>
<a href="#">Bugger</a><br>
<a href="#">Bugger</a><br>
<a href="#">Bugger</a><br>
</td></tr></table>
</body>
</html>
Cheers! If you're looking for the JavaScript/HTML/DHTML/CSS equivalent of the vb-world site, check out this link http://freewarejava.com/cgi-bin/Ultimate.cgi

run2thesun
Aug 6th, 2000, 10:57 PM
Keep in mind that Netscape doesn't read stylesheets. So the
links which you format using CSS won't come out the way it
was written to. The colours will come out the way it was
written in the <BODY> tag. I don't know about Netscape 6
though...

Mel.

billyo
Aug 7th, 2000, 12:27 AM
What are you talking about!? "Netscape doesn't read style sheets?!" Are you daft? Did you try loading the code I posted in Netscape? The only difference is that a:hover doesn't work in NS4, which I noted in my post. (It is planned for NS6 however.) "Netscape doesn't read style sheets." Did you know that Netscape doesn't read HTML either...

parksie
Aug 7th, 2000, 03:38 AM
Actually...I did manage to get a:hover to work in NS4.7

PS: I think something's going to have to be done about the gratuitous Britain-bashing...

RULE BRITANNIA!

Michael
Aug 7th, 2000, 04:07 AM
Steady on, parksie. In the true tradition of British fair play, let me say that it was me that started it by having a dig at our ex-colonials. We British like to do that occasionally, but generally, we much prefer to have a pop at the French. Can you post the code for your NS4.7 solution, please?

The reason I started banging on about the word "colour" is because I KNOW it has to be spelt "color" in the coding, but a decent education is difficult to cast aside, and I often put "colour" in the code.

I sometimes wish that Netscape did not support css, because then we would know where we stand. I am discovering almost daily that Netscape does not support a particular css feature.

Billyo: Glad to see that you returned the banter, especially with your choice of names in the code!!!

I have a heavy schedule for the next few days so I won't be able to try out your code yet, but it does look promising. Thanks for the solution, and thanks also for the url. I had a quick look at it and I will certainly be signing up for it.


[Edited by Michael on 08-07-2000 at 05:24 AM]

HarryW
Aug 7th, 2000, 07:06 AM
I dunno, these soapies with their si-mul-tan-eous data routes playing their gee-tars ;)

Did you know that the biggest cities during the industrial revolution were in Britain and China? It was because we drink so much tea, which is boiled first, sterilising it. Handy when you're in a massive city surrounded by filth and smog ;) Other countries who drink water cold mainly tended to kill themselves off with pollution when the cities got too big.

parksie
Aug 7th, 2000, 09:23 AM
Michael: I lost it somewhere (it's quite hard to find a 2K file out of over 250,000 other files on 40GB of disk space!) When I find it, I'll post it. BTW - I'm harsh to most foreigners...especially when they claim to use English but it's really some violated dialect of it.

Michael
Aug 7th, 2000, 06:27 PM
OK parksie - it would have been nice to have a complete and consistent solution, but que sera sera ...

Just as a matter of interest, do you include Scouse and Geordie in your "violated dialects?"

parksie
Aug 8th, 2000, 05:47 AM
Nope. They're British - they can do what they want. They're allowed to. It's when other countries hijack our language that I get a bit annoyed.

parksie
Aug 9th, 2000, 05:00 PM
Go for it. I've actually got a Union Jack on the wall at home...

billyo
Aug 27th, 2000, 03:55 PM
Came across this work around for a:hover in netscape, but I personally don't think it's worth the extra effort. Netscape's just a poopy browser, and only about 20% of internet users are using it...

http://webreference.com/js/column4/workaround.html

noone
Aug 27th, 2000, 05:19 PM
You have to remember though that when we are talking about potentially thousands or even millions of visitors, 20% is a lot of people.

billyo
Aug 27th, 2000, 07:06 PM
That's true. That's why I say it doesn't seem worth the effort for something as trivial as a:hover. Besides, that browser has some deeper issues that could seriously effect its "millions" of users:

http://www.infoworld.com/articles/hn/xml/00/08/08/000808hnsecurity.xml

noone
Aug 27th, 2000, 10:33 PM
Hmm that is an interesting exploit. I have to agree with you that it probably isn't worth the effot for something like a:hover. I use several different browsers regularly and IMNSHO the content is much more important then how it is presented. That's why I'm not such a big fan of flash.

Michael
Aug 28th, 2000, 09:08 AM
I thought this thread was dead and buried!!!

billyo: I checked out your "workaround" link and I think I will use it.

I like to get consistency of look and operation between IE and Netscape. Even though Netscape is at about 20%, 20% of a very large number is still a very large number (please god don't let some smartarse start a boring discussion on infinity).

I believe IE and Netscape account for about 95% of all browsing - what about the others? Lynx, Opera? Should we cater for these in our code? Personally I don't think it is worth the effort. It is enough to get consistency between IE and Netscape.

Feb 1st, 2001, 06:51 AM
I've been playing about with a number of browsers at college. Netscape and IE are the only ones worth working towards. My advice is to build your site for IE (check both Mac and PC - thats where the big differences lie), and then test it using Netscape (again Mac / PC). Fix any problems which prevent the site from being viewed (at all), finally if you're bothered about appearance, fix anything that views incorrectly. This way, you're covering the widest audiences at all times - if you need to publish the site in a hurry, it will still be useable.