Results 1 to 19 of 19

Thread: Link colours (or is it colors?)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    Leicester, UK
    Posts
    123
    ... 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.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    Leicester, UK
    Posts
    123
    C'mon guys !!! Please help me!!!

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

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    Leicester, UK
    Posts
    123
    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?

  4. #4
    Junior Member
    Join Date
    May 2000
    Posts
    28
    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.

    Code:
    <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

  5. #5
    Member
    Join Date
    Jun 2000
    Location
    Toronto, Canada
    Posts
    52
    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.

  6. #6
    Junior Member
    Join Date
    May 2000
    Posts
    28
    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...

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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!
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    Leicester, UK
    Posts
    123
    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]

  9. #9
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    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.
    Harry.

    "From one thing, know ten thousand things."

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    Leicester, UK
    Posts
    123
    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?"

  12. #12
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  13. #13
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Go for it. I've actually got a Union Jack on the wall at home...
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  14. #14
    Junior Member
    Join Date
    May 2000
    Posts
    28
    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

  15. #15
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    You have to remember though that when we are talking about potentially thousands or even millions of visitors, 20% is a lot of people.
    "People who think they know everything are a great annoyance to those of us who do."

  16. #16
    Junior Member
    Join Date
    May 2000
    Posts
    28
    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...hnsecurity.xml

  17. #17
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    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.
    "People who think they know everything are a great annoyance to those of us who do."

  18. #18

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    Leicester, UK
    Posts
    123
    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.


  19. #19
    Guest

    Browsers?

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width