Isaiah Bugarin Isaiah Bugarin - 1 year ago 61
CSS Question

The CSS selector "hover" is not working on my HTML code

For some reason, my

isn't working. Here's my CSS code:


And my HTML

<div id="header">
<a href="index.html"><img src="header.png" class="image" onload="ChangeColors(this)" /></a>

Any ideas on why this isn't working?

Answer Source

It's working - you just have to correct your CSS rules.

For border you have to specify its width and style, not just color. Same for the box-shadow - the color itself isn't enough.

.image:hover {
  border: 2px solid #000000;
  box-shadow: 10px 10px 5px rgb(0,255,153);
<div id="header">
  <a href="index.html"><img src="" class="image" /></a>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download