Hi, guys!

I have a problem with this site I am making. I have a meny similar to the one in Daniweb, but without the drop-down menu. I made it with a set of DIVs with a 1px wide backrgound image with a background-repeat: repeat-x;
setting. The menu looks pretty much the same as on this page, only it has square corners. When I put a href tag around a div, and in the CSS set the div:hover to change the background image, it forks like a charm in Firefox, but not in IE. I mean in IE the link works just as well, but the mouse pointer does not turn into a hand when over it, nor does the backgroun image change.
Pls help.

11 Years
Discussion Span
Last Post by MidiMagic

I dont think IE6 doesnt support the div:hover.

You would need to use the


Hope this helps you out.


The problem is that you can't have other container tags inside anchor (a) tags. Put the divs outside the anchors.

<div class="stuff">
<a href="pootwattle.htm">Feitlebaum's wins</a>

Actually, this is a place where tables work better than divs.


I wanted the whole div to act as a link. It works fine in firefox, and looks cool, as if I made a button in Photoshop, only it loads much faster. IE just won't listen.


I wasn't too clear on this before.

div is a block tag.

a (anchor) is an inline tag.

Block tags are not supposed to be inside inline tags. Some browsers allow this illegal use, while others don't.

You might try using span instead of div. Span is the inline version of div.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.