Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tag text bgcolor to change

 
sridevi sangaiah
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
how can i change the background color of<a href=xyz> anchor text</a> when mouse is over it.
thanks,
sridevi
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SriDevi,
The following will do the trick. But works in IE only.
regds
maha anna


[This message has been edited by maha anna (edited March 20, 2001).]
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

"sridevi",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In IE and Netscape you can do this:
<A HREF="http://my.yahoo.com" OnMouseOver="this.style.color='red'" OnMouseOut="this.style.color='black'">my.yahoo.com</A>
 
sridevi sangaiah
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
thanks. it worked.
Originally posted by maha anna:
[B]SriDevi,
The following will do the trick. But works in IE only.
regds
maha anna


[This message has been edited by maha anna (edited March 20, 2001).][/B]

 
sridevi sangaiah
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
this way of doing it changes the color of the text and not the background of the text.
thanks,
sridevi
Originally posted by Bodie Minster:
In IE and Netscape you can do this:
<A HREF="http://my.yahoo.com" OnMouseOver="this.style.color='red'" OnMouseOut="this.style.color='black'">my.yahoo.com</A>

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doh! Sorry, I misread your question.
 
Ruyard Kipling
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should check out cascading style sheets, they can do all kinds of nify things, and you dont have to put 30000 <FONT> tags, or bgcolor attributes...

what you want to do is called hovering, i think....
[This message has been edited by Ruyard Kipling (edited April 26, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic