Re: a:hover and a:active and named anchors

On Friday 26 July 2002 1:11 am, Stuart Ballard wrote:
|  Jerry Baker wrote:
|  > I realize that some people may want to apply :hover and :active to
|  > elements that don't "do" anything (but I can't figure out why). My
|  > concern is really only that named anchors are matching the a:hover and
|  > a:active selectors when they did not match in CSS1.
|  A couple of examples:
|  div.autoexpand p {display: none}
|  div.autoexpand:hover p {display: block}
|  <div class="autoexpand">
|     <h2>Sub Heading</h2>
|     <p>Text that goes with that subheading, that will only appear when
|  the mouse is hovered over the heading. A similar technique could be used
|  with table display types to get an expanding menu system that works even
|  if the menu headings aren't links themselves. Using this trick with
|  fixed, absolute or relative positioning could be used to produce a
|  tooltip-like popup effect.</p>
|  </div>

I have tried this example in Konqueror 3.0.2 and Mozilla 1.0 - it doesn't 
Can you pls let us know what browsers support such handling of :hover classes?

|  img.thumbnail {width: 100; height: 100}
|  img.thumbnail:hover {width: auto; height: auto}
|  <img class="thumbnail" src="large-image.png" />
|  I agree that having a:hover and a:active match <a name=""> is a problem
|  (and one that we wouldn't have if html had been designed sanely, with
|  different elements for different purposes). That's why I suggested new
|  pseudoclasses, so that legacy behavior could be preserved for :hover and
|  :active, but effects like the above would still be possible.
|  Stuart.


Vadim Plessky  (English)
33 Window Decorations and 6 Widget Styles for KDE
KDE mini-Themes

Received on Wednesday, 7 August 2002 03:31:31 UTC