Click to See Complete Forum and Search --> : underline text
Bulldawg
12-17-2003, 04:33 PM
Hi Everyone
I'm brand new to Javascript and I've run into a snag (big surprise, right!)
How can I underline text using an onmouseover event? So onmouseover its underlined and onmouseout its not.
I'm having trouble figuring what to reference. The text I want to underline is in a table.
Thank you (got to find the aspirin!:eek: )
Dawg
aperey
12-17-2003, 04:45 PM
Dear Dawg,
I found this script in an email I received from SitePro news, to which I subscribe (SitePro News <spn-h2@sitepronews.com> ). It makes the mouseover you describe. You can change the color attributes. Here it is:
<style TYPE="text/css"> <!-- A {text-decoration: none; color: #000080}
A:hover {text-decoration: underline; color: #CC0033} -->
</style>
You put it between your <head> and </head> tags. But it worked for me even after the </head> tag for some reason.
You can see what it looks like on http://www.AestheticRealism.org, the website of the Aesthetic Realism Foundation. I am one of the webmasters for it.
Best,
Arnold Perey
havik
12-17-2003, 04:55 PM
http://www.webdevfaqs.com/css.php#hyperlinks
Bulldawg
12-17-2003, 05:13 PM
aperey
Works perfectly. I completely overlooked using CSS :o
It's hard to keep all the different parts of web development straight! Thanks for making my day a little easier! (spend an hour trying to figure out what to reference with script!)
Regards
Dawg