Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help to make html text change color on rollover. 1

Status
Not open for further replies.

zndow

Technical User
Apr 5, 2005
16
CA
I am totaly new on rollover things. Here what i want to do.

Let say i have this:

<tr>
<td><font color="#cccccc">Click the logo to update</font></td>
</tr>

What would be the code to make that simple text change to orange color when a mouse rollover.
 
first of all, drop the <font> tag: it's officially redundant.
Use CSS to style your elements.

I imagine it'd be a link, seeing as it's changing when you mouseover - in which case some simple CSS will do the trick.
Code:
a {
  color: #cccccc;
}
a:hover {
  color: #ffcc33;
}
The :hover pseudoclass only works on <a> tags in IE. It works on almost all elements in standards browsers such as Moz.

To gen up on CSS, in addition to Googling, take a look through Eric Meyer's sites (meyerweb and complex spiral), as well as the CSS Zen Garden.

<marc>
 
Would you write the hole code. I dont know what to do with this css you writed.

<a> Put here how i have to proceed for the example i gave. </a>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top