a little problem with <a name> attribute.

Discussion in 'HTML' started by picayunish, Sep 21, 2003.

  1. picayunish

    picayunish Guest

    Good day,

    I'm working on a page with <a name> attribute in the content.
    What I know is when you click on a link with a hyper as #blah. You go to
    the blah chapter on the same page.

    When I viewed the page with Netscape 7.1 the word or headline with the <a
    name> have a hover effect, when you move the mouse over the word or
    headline. To disable the hover effect of the <a name> attribute I use
    #blah:link and #blah:hover in the style sheet.

    The hover effect with the <a name> attribute are only with Netscape 7.1 and
    Firebird.
    You can see the hover effect of the <a name> attribute in headline at
    http://members.chello.nl/e.vandervaart/note.html#fake

    Is there a better work around for this little problem?
    --
    Edwin van der Vaart (Geen familie van....)
    http://www.semi-conductors.nl/ PHP Redirect to semi-conductor.nl
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://members.chello.nl/e.vandervaart/ Experimental site
    http://host.deluxnetwork.com/~evdvaart/ Experimental PHP site
    picayunish, Sep 21, 2003
    #1
    1. Advertising

  2. picayunish

    Chris Morris Guest

    "picayunish" <> writes:
    > When I viewed the page with Netscape 7.1 the word or headline with the <a
    > name> have a hover effect, when you move the mouse over the word or
    > headline. To disable the hover effect of the <a name> attribute I use
    > #blah:link and #blah:hover in the style sheet.


    a[name]:link,
    a[name]:hover
    will save you some typing (but not work in IE, though that doesn't
    seem to be a problem here)

    > The hover effect with the <a name> attribute are only with Netscape 7.1 and
    > Firebird.
    > You can see the hover effect of the <a name> attribute in headline at
    > http://members.chello.nl/e.vandervaart/note.html#fake
    >
    > Is there a better work around for this little problem?


    Rather than using
    <element><a name="blah">Content</a></element>
    use
    <element id="blah">Content</element>
    Doesn't work in Netscape 4, but it works in more recent browsers fine.

    --
    Chris
    Chris Morris, Sep 21, 2003
    #2
    1. Advertising

  3. picayunish

    picayunish Guest

    picayunish, Sep 21, 2003
    #3
  4. picayunish

    Kae Verens Guest

    picayunish wrote:
    > Good day,
    >
    > I'm working on a page with <a name> attribute in the content.
    > What I know is when you click on a link with a hyper as #blah. You go to
    > the blah chapter on the same page.
    >
    > When I viewed the page with Netscape 7.1 the word or headline with the <a
    > name> have a hover effect, when you move the mouse over the word or
    > headline. To disable the hover effect of the <a name> attribute I use
    > #blah:link and #blah:hover in the style sheet.
    >
    > The hover effect with the <a name> attribute are only with Netscape 7.1 and
    > Firebird.
    > You can see the hover effect of the <a name> attribute in headline at
    > http://members.chello.nl/e.vandervaart/note.html#fake
    >
    > Is there a better work around for this little problem?



    didn't see the problem with Mozilla 1.5b

    instead of <a name="fake">whatever</a>, use <a name="fake"></a>whatever

    Kae
    Kae Verens, Sep 21, 2003
    #4
  5. picayunish

    picayunish Guest

    Kae Verens wrote in news:sVjbb.32594$:
    > picayunish wrote:
    >> Good day,
    >>
    >> I'm working on a page with <a name> attribute in the content.
    >> What I know is when you click on a link with a hyper as #blah. You go to
    >> the blah chapter on the same page.
    >>
    >> When I viewed the page with Netscape 7.1 the word or headline with the
    >> <a name> have a hover effect, when you move the mouse over the word or
    >> headline. To disable the hover effect of the <a name> attribute I use
    >> #blah:link and #blah:hover in the style sheet.
    >>
    >> The hover effect with the <a name> attribute are only with Netscape 7.1
    >> and Firebird.
    >> You can see the hover effect of the <a name> attribute in headline at
    >> http://members.chello.nl/e.vandervaart/note.html#fake
    >>
    >> Is there a better work around for this little problem?

    >
    >
    > didn't see the problem with Mozilla 1.5b


    That's strange.

    > instead of <a name="fake">whatever</a>, use <a name="fake"></a>whatever


    Wow! Now it's working also in NN4.79 :)
    Thanx Kae.
    --
    Edwin van der Vaart (Geen familie van....)
    http://www.semi-conductors.nl/ PHP Redirect to semi-conductor.nl
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://members.chello.nl/e.vandervaart/ Experimental site
    http://host.deluxnetwork.com/~evdvaart/ Experimental PHP site
    picayunish, Sep 21, 2003
    #5
  6. picayunish wrote:

    > I'm working on a page with <a name> attribute in the content.
    > What I know is when you click on a link with a hyper as #blah. You go to
    > the blah chapter on the same page.
    >
    > When I viewed the page with Netscape 7.1 the word or headline with the <a
    > name> have a hover effect, when you move the mouse over the word or
    > headline. To disable the hover effect of the <a name> attribute I use
    > #blah:link and #blah:hover in the style sheet.


    The Netscape effect is correct. Opera 7 should do the same.

    You may like to add a rule to your style sheet:

    a[name]:hover {
    color: inherit !important;
    background-color: inherit !important;
    }

    Alternatively, use the more modern (since 1995?) way of specifying anchor
    targets within a document. Instead of:

    <h2><a name="blah">Blah</a></h2>

    use

    <h2 id="blah">Blah</h2>

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
    Toby A Inkster, Sep 21, 2003
    #6
  7. picayunish

    picayunish Guest

    Toby A Inkster wrote in news:p:
    > picayunish wrote:
    >
    >> I'm working on a page with <a name> attribute in the content.
    >> What I know is when you click on a link with a hyper as #blah. You go to
    >> the blah chapter on the same page.
    >>
    >> When I viewed the page with Netscape 7.1 the word or headline with the
    >> <a name> have a hover effect, when you move the mouse over the word or
    >> headline. To disable the hover effect of the <a name> attribute I use
    >> #blah:link and #blah:hover in the style sheet.

    >
    > The Netscape effect is correct. Opera 7 should do the same.
    >
    > You may like to add a rule to your style sheet:
    >
    > a[name]:hover {
    > color: inherit !important;
    > background-color: inherit !important;
    > }


    You mean e.g. color: #000; background: transparent;

    > Alternatively, use the more modern (since 1995?) way of specifying anchor
    > targets within a document. Instead of:
    >
    > <h2><a name="blah">Blah</a></h2>
    >
    > use
    >
    > <h2 id="blah">Blah</h2>


    If I use
    <h2><a name="blah"></a>Blah</h2>
    The jump to the chapter Blah works with older browser version (e.g.
    NN4.79).

    When I use
    <h2 name="blah">Blah</h2>
    Doesn't work in older browser versions.

    What is wise. To include the older browser with the jump to the right
    chapter on the page or to exclude the older browser versions?
    --
    Edwin van der Vaart (Geen familie van....)
    http://www.semi-conductors.nl/ PHP Redirect to semi-conductor.nl
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://members.chello.nl/e.vandervaart/ Experimental site
    picayunish, Sep 21, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ding feng
    Replies:
    2
    Views:
    2,801
    ding feng
    Jun 25, 2003
  2. bprimuslevy
    Replies:
    1
    Views:
    437
    Soren Kuula
    Aug 23, 2006
  3. ThaDoctor
    Replies:
    3
    Views:
    380
    Alan Woodland
    Sep 28, 2007
  4. Pavils Jurjans
    Replies:
    3
    Views:
    180
    Pavils Jurjans
    Mar 18, 2005
  5. Daniel
    Replies:
    1
    Views:
    208
    Bart van Ingen Schenau
    Jul 9, 2013
Loading...

Share This Page