Edmachine Posted July 5, 2007 Share Posted July 5, 2007 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 More sharing options...
jesh Posted July 5, 2007 Share Posted July 5, 2007 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 More sharing options...
Edmachine Posted July 5, 2007 Author Share Posted July 5, 2007 Wow, thanks a lot ! The CSS will do . Thank you for being helpful and fast! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.