Friday, September 12, 2008

How to change background color in a DIV tag on onmouseover

As a web developer it's essential that you are comfortable with CSS styles, you maybe a php,.net,ruby on rails developer but it's always good to have some style tricks in your pocket so that you don't need to find a web designer to do it for you. following code is a simple way to change the color of the background of a DIV tag on mouse over event.

<div onmouseover="'green';"

Get Free Sinhala IT Learning Videos

Get custom programming done at!


  1. Awesome, I was looking all over for this code. I knew there was a simple way to do this. Thank you for posting this!

  2. Thanks for your tip. Really useful