Jump to content

onMouseOver=somehow change background for one area


Edmachine

Recommended Posts

Hello!I have a simple question...I got a navigation bar. The code is as follows:

<p>|<a href=index.php> Home </a>| News | ... | ...| ...| ...| ...| ...| ...| ...| ...| ... | ... |</p>

I cut some parts... Anyways, how can I make the " Home " part change background color to #666666 when I roll the mouse over?

Link to comment
Share on other sites

The easiest way is to use CSS:

<style type="text/css">a:hover { background-color: #666; }</style>

But you could also use java script:

<a href="index.php" onmouseover="this.style.backgroundColor='#666';" onmouseout="this.style.backgroundColor='transparent';"> Home </a>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...