On Mon, 19 Mar 2007, Sandy wrote:

> is there a good way, once your link is nicely
> tucked into a <li> of getting the background of the container <li> to
> change colour on mouse over, instead of just the A background colour?

If I understand you correctly, you just need to make the A element occupy 
the entire content of the enclosing LI. The simple way is to make the A 
element a block in CSS terms and set a width for it. For example:

#navlist { width: 8em; }
#navlist a { display: block; width: 100%; }
#navlist :hover { background: yellow; }

> Is <a href="link.html"><li>link</li></a> acceptable?

It's syntactically wrong by HTML rules, so in principle all bets are off. 
In practice, browsers might do what you want, but there's really no reason 
to use such tricks.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- 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/

Reply via email to