Say I have a div with the following attributes:
.box { width: 300px; height: 67px; margin-bottom: 15px; }
How would I make it so that if
You can do it with CSS only:
.box:hover{ background: blue; cursor: pointer; }
Or with Javascript (I'm using jQuery in this example)
;(function($){ $('.box').bind('hover', function(e) { $(this).css('background', 'blue'); }); })(jQuery);