UndergroundScene Forums  

Welcome to the UndergroundScene Forums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!


Go Back   UndergroundScene Forums > SPECIAL AREAS > Information Technology
Register FAQ Site Areas Gig Guides Members Calendar Arcade Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 13th March 2003, 03:04 PM   #1 (permalink)
Crabs
Registered User
 
Crabs's Avatar
 
Join Date: May 2002
Location: Stirling
Posts: 174
Crabs is an unknown quantity at this point
Hyperlinks

Does anyone know how to code a hyperlink so that when you put the mouse pointer over it it changes colour using html?
Crabs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13th March 2003, 03:34 PM   #2 (permalink)
Red_Baron
Senior Member
 
Red_Baron's Avatar
 
Join Date: Apr 2002
Location: Dundee/Alyth hybrid
Posts: 1,491
Band: 15 Minutes
Red_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura about
stylesheets is the easiest way to do it

<style>
a:hover { color : "yellow"}
a:link { color:"blue"}
a:visited{ color:"red"}
</style>

that's just off the top of my head. Best to check a stylesheet or html reference

You could also write a javascript function that takes the anchor tag id or name as an argument and changes the color of the anchor.

You'd then call this function using the anchor mouseOver event. Of course you'd have to write another function for the mouseOut event as well.

I'd recomend the sytle's though. Just copy that style block I've written and put it in the head seaction of your page.

NB: You can youse rgb color codes or hex codes as well.

Last edited by Red_Baron : 13th March 2003 at 04:00 PM.
Red_Baron is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 13th March 2003, 04:20 PM   #3 (permalink)
Red_Baron
Senior Member
 
Red_Baron's Avatar
 
Join Date: Apr 2002
Location: Dundee/Alyth hybrid
Posts: 1,491
Band: 15 Minutes
Red_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura about
I've just had a look at your code. You'll have to remove all the <font> tags as they'll overide your anchor styles. You'd be best setting the styles for these anchors using a style sheet as well

a {font-style:"......."}

something like that.

Then put all the hover, visited stuff below it. It'll only be 4 or 5 lines much better than all those font tags.



hope that helps
Red_Baron is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 16th March 2003, 05:52 PM   #4 (permalink)
Crabs
Registered User
 
Crabs's Avatar
 
Join Date: May 2002
Location: Stirling
Posts: 174
Crabs is an unknown quantity at this point
cheers mikey, I'll give it a try and see how it goes!
Crabs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 16th March 2003, 05:57 PM   #5 (permalink)
kj
gimp
 
kj's Avatar
 
Join Date: Aug 2001
Location: Scotland
Posts: 13,935
Band: A band of merry men
kj has disabled reputation
best use specific hex codes for colours in the style sheet though, and try and keep em web save (216 colours) but i tend not to
kj is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 16th March 2003, 09:05 PM   #6 (permalink)
Crabs
Registered User
 
Crabs's Avatar
 
Join Date: May 2002
Location: Stirling
Posts: 174
Crabs is an unknown quantity at this point
BINGO!!!

Cheers guys I got it working like a treat! The only other thing I had to do that you didn't mention was add an extra a:hover {color : "#ffffff"} underneath a:visited {color : "#ff0000"} because the color was only changing on links that hadn't been visited! Doin that sorted it though!

Cheers Again
Crabs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 17th March 2003, 11:16 AM   #7 (permalink)
Red_Baron
Senior Member
 
Red_Baron's Avatar
 
Join Date: Apr 2002
Location: Dundee/Alyth hybrid
Posts: 1,491
Band: 15 Minutes
Red_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura aboutRed_Baron has a spectacular aura about
you shouldn't have to do that, maybe a bug in IE so long as it's working.
Red_Baron is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT. The time now is 12:36 PM.


Powered by vBulletin
UndergroundScene.co.uk is bad-ass and under copyright

Content Relevant URLs by vBSEO 3.0.0 RC8