Sander van Surksum wrote:
> The problem is that the a hover takes the padding from the normal h3 selector
> and I
> think that why he isn't changing the whole background on a hover.
If you remove the padding from the <h3> and apply it to the <a>, the
entire background will change. That's fine if all of the list elements
are going to be links.
h3 { ... padding: 0; ... }
a { ... padding: 4px 0 0 8px; }
If you want to keep some non-link elements there, then you'll need to
keep the padding inside the <h3> and use negative margins to line the
<a>s up:
h3 { ...
padding: 4px 0 0 8px;
...}
a { ...
padding: 4px 0 0 8px;
margin: -4px 0 0 -8px;
...}
This second example is probably better as it allows you the flexibility
to unlink text at a later date.
I've tested this in Firefox 1.5 without any problems; I can't test in IE
at the moment because I've broken it (stupid multiple IE installs :) but
it should work OK.
-Rob
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/