• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

Help with code

Question

aco    0

I need some help with the coding of the tag below. The problem is - onMouseOver I want the background of the cell to be an image instead of a solid colour.

onMouseOver="style.backgroundColor='#A4B3DC'"

onClick='openLink("index.htm,"_self")' onMouseOut="style.backgroundColor='#EFFEFF'" align=right width=111>

HOME

Any help is much appreciated :)

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
Captain Phatty    0

I can't tell you how long I tried to figure that out (ok, I can, about 2 hours.) I tried so many different variations, nothing seemed to work. Thanks for the answer, I had given up :)

Share this post


Link to post
Share on other sites
  • 0
Gooey    1

Hmm... Personally I wwould have given the TD a class and just changed that in the mouse over. Much more flexible and it keeps all your styles in a single file. Ho well... ;)

Share this post


Link to post
Share on other sites
  • 0
maxprogram    0

i also have another way of doing it -

<pre>

<td 

onMouseOver="td1.style.background='url('image2.gif')';" 

onClick='openLink("index.htm,"_self")' 

onMouseOut="td1.style.background='url('image1.gif')';" 

align=right width=111 id="td1" background="image1.gif">



<div class=menuItem> <font class="text">HOME</font> </div> 

</td> 

</pre>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.