RE: text rollover query

by "Sauyet, Scott (OTS-HAR)" <Scott_Sauyet(at)output.net>

 Date:  Fri, 18 Jan 2002 15:12:59 -0600
 To:  "'Marsha Graham'" <mgraham(at)mva.net>,
hwg-style(at)hwg.org
  todo: View Thread, Original
> What I have been trying to locate is the way to do a rollover on a link 
> using the a:hover command so that the small text becomes larger as I'm 
> shrinking text sizes to keep the nav bar from being 2 screens long.
> 
> I have tried
> 
> a:hover {text-decoration: none; background: #EEB422; font-size: large}
> 
> but it doesn't seem to get a response.

This is probably because of the order of your pseudo-classes.  Put the
"a:hover" class after the link, visited, and active ones.  Note, though,
that this reflows your navigation links, which IMHO is a bit ugly.

Moreover there is no guarantee that browsers *will* pay attention to this
rule, because, according to the CSS specs,

    "User agents are not required to reflow a currently displayed document
    due to pseudo-class transitions. For instance, a style sheet may
    specify that the 'font-size' of an :active link should be larger than
    that of an inactive link, but since this may cause letters to change 
    position when the reader selects the link, a UA may ignore the 
    corresponding style rule."

(from http://www.w3.org/TR/REC-CSS2/selector.html#dynamic-pseudo-classes)

Good luck,

  -- Scott

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.