W3C home > Mailing lists > Public > www-style@w3.org > January 2002

Re: Behavior of nested Links, pseudos and style

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 31 Jan 2002 15:38:46 -0500
Message-Id: <200201312038.PAA07008@no-knife.mit.edu>
To: "Manos Batsis" <m.batsis@bsnet.gr>
cc: www-style@w3.org
With the code below, both the div and the span get red and underlined
when "outer link" is hovered over in Mozilla (modulo bug 5693).  That
seems correct to me...

> <?xml version="1.0"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
>    <head>
>       <title>
>         Test: Nested elements, :hover pseudo-class
>       </title>
> <style type="text/css">
> div{padding:5px;}
> span{background:yellow;}
> div:hover,span:hover{color:red;text-decoration:underline;}   
> </style>
>    </head>
>    <body>
>       <div>outer link, <span>inner link</span></div>
>    </body>
> </html>

Boris
-----------------
617-864-9910
-----------------
Washington [D.C.] is a city of Southern efficiency and
Northern charm.
                       -- John F. Kennedy
Received on Thursday, 31 January 2002 15:38:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:12 GMT