How Do I prevent a:hover from affecting <a name=...>

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ben Sharvy

    How Do I prevent a:hover from affecting <a name=...>

    I know I could do it by restricting hover to a class of links
    (a:hover.actual lyalink) but is there a way that doesn't require me to
    change every link in every existing html document?
  • brucie

    #2
    Re: How Do I prevent a:hover from affecting &lt;a name=...&gt;

    In comp.infosystem s.www.authoring.html Ben Sharvy said:
    [color=blue]
    >[ How Do I prevent a:hover from affecting <a name=...>]
    > I know I could do it by restricting hover to a class of links
    > (a:hover.actual lyalink) but is there a way that doesn't require me to
    > change every link in every existing html document?[/color]

    a:link:hover


    --
    the facts and opinions expressed by brucies
    l i t t l e v o i c e s
    are not necessarily the same as those held by brucie.

    Comment

    • Mitja

      #3
      Re: How Do I prevent a:hover from affecting &lt;a name=...&gt;

      Ben Sharvy wrote:[color=blue]
      > How Do I prevent a:hover from affecting <a name=...>
      > I know I could do it by restricting hover to a class of
      > links (a:hover.actual lyalink) but is there a way that[/color]
      a.blah:hover, in fact
      [color=blue]
      > doesn't require me to change every link in every existing
      > html document?[/color]
      override the css properties only for your <a id="foo> like this:
      a#foo:hover { settings you have for unhovered links }
      AFAIK only works for id=foo, not name=foo, though.


      Comment

      • Rijk van Geijtenbeek

        #4
        Re: How Do I prevent a:hover from affecting &lt;a name=...&gt;

        On Tue, 9 Nov 2004 07:13:38 +1000, brucie <shit@usenetshi t.info> wrote:
        [color=blue]
        > In comp.infosystem s.www.authoring.html Ben Sharvy said:
        >[color=green]
        >> [ How Do I prevent a:hover from affecting <a name=...>]
        >> I know I could do it by restricting hover to a class of links
        >> (a:hover.actual lyalink) but is there a way that doesn't require me to
        >> change every link in every existing html document?[/color]
        >
        > a:link:hover[/color]

        Or:

        a[href]:hover

        Both selectors run foul of MSIE's lack of support for these construct.
        Maybe it is best to just avoid using <a name=...>, and stick to using ID
        attributes on other elements. You can't use those IDs for in-page links in
        Netscape 4, all other browsers in current use support it.

        --
        Rijk van Geijtenbeek

        The Web is a procrastination apparatus:
        It can absorb as much time as is required to ensure that you
        won't get any real work done. - J.Nielsen

        Comment

        • DU

          #5
          Re: How Do I prevent a:hover from affecting &lt;a name=...&gt;

          Ben Sharvy wrote:
          [color=blue]
          > I know I could do it by restricting hover to a class of links
          > (a:hover.actual lyalink) but is there a way that doesn't require me to
          > change every link in every existing html document?[/color]


          a:not([name]):hover { ...your declarations ...} /* CSS3 selector */

          will only work in Mozilla 1.6 and higher.

          DU
          --
          The site said to use Internet Explorer 5 or better... so I switched to
          Mozilla 1.7.5 :)

          Comment

          • Els

            #6
            Re: How Do I prevent a:hover from affecting &lt;a name=...&gt;

            DU wrote:
            [color=blue]
            > Ben Sharvy wrote:
            >[color=green]
            >> I know I could do it by restricting hover to a class of
            >> links (a:hover.actual lyalink) but is there a way that
            >> doesn't require me to change every link in every existing
            >> html document?[/color]
            >
            > a:not([name]):hover { ...your declarations ...} /* CSS3
            > selector */
            >
            > will only work in Mozilla 1.6 and higher.[/color]

            I wonder if the OP has been waiting for that answer for the past
            four months... ;-)

            --
            Els
            Blog and other pages, mostly outdated.

            Sonhos vem. Sonhos vão. O resto é imperfeito.
            - Renato Russo -

            Comment

            Working...