On 3/19/07, Jukka K. Korpela <[EMAIL PROTECTED]> wrote:
> 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.

You probably won't even need to set a width. By default, block
elements expand horizontally to fill the available space - in this
case the with of the LI, which is already block.

Remember that all modern browsers (including IE7) allow :hover
pseudoclasses on any element, so you could set the background colour
using

li:hover { color:#xxx }

...provided you don't mind a little graceful degradation (ie no hover
effect) in IE6.

-- 
Chris Ovenden

http://thepeer.blogspot.com
"Imagine all the people / Sharing all the world"
______________________________________________________________________
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