View Full Version : text mouseOver question...
Tchendoh
July 6th, 2001, 14:59
I've been able to change an image when I'm over a link, but now I want to be able to change a text when I'm over a link...
I don't know how to do that...
can anybody help?
YUPAPA
July 6th, 2001, 20:27
Image to Text?
or the TEXT color?
polestar
July 7th, 2001, 06:20
use stylesheets... put the following between the <head> tags
<STYLE TYPE="text/css">
<!--
.hov A:hover {color: red}
-->
</STYLE>
Now use <a href=link class=hov> wherever you want the text effect applied. If you want it on all links, omit the stuff in bold.
You can have hore changes than color, like underline, bold, etc
look here for an introduction to what can be done:
http://www.htmlite.com/CSSintro.htm
hope this is what you meant, good luck!
Tchendoh
July 7th, 2001, 16:42
I'll try to explain better... I have a menu which look like this...
photos
programs
books
etc.
!description here!
and I want that when I move the mouse over photos, or any other category, the description text change below...
I hope someone understands and it's do-able!
Dusty
July 8th, 2001, 20:46
This works in Netscape 4.x and IE 5.x, not sure about anything else:
<a href="javascript:void()" onMouseOver="if(document.all){document.all['text'].innerHTML='new_text_here';}else if(document.layers){document['text'].document.write('new_text_here');document['text'].document.close();}">link_here</a>
<span id="text" style="position:absolute;">old_text_here</span>
Tchendoh
July 8th, 2001, 21:06
it looks great! thanks a lot! I'll try that..!
meow
July 8th, 2001, 21:11
Yeah, nice. :)
Question: does it need to be an absolutely positioned element?
Opera choked on it, of course. :(
Dusty
July 8th, 2001, 21:20
Question: does it need to be an absolutely positioned element?
It doesn't have to be in IE, but for it to work in both IE and Netscape it does.
Opera choked on it, of course.
I don't know how Opera handles layers, but if anyone else here does they could probably modify it somehow to work.
meow
July 8th, 2001, 22:01
OK. Thanks. Opera is picky. It uses (or so they say) ECMA-262.
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.