DYNAMICALLY disable links with CSS?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve Pugh

    #31
    Re: DYNAMICALLY disable links with CSS?

    google-2003-03@kjsmith.com (Karl Smith) wrote:
    [color=blue]
    >Steve Pugh <steve@pugh.net > wrote:
    >[color=green]
    >> Mark Johnson <102334.12@comp userve.com> wrote:
    >>[color=darkred]
    >> >I wanted it simply to be treated as text, even though it is
    >> >marked up with an anchor tag in the XHTML.[/color]
    >>
    >> There is no way in CSS to remove the link from an <a> element without
    >> removing the whole element.[/color]
    >
    >To disable a link using only CSS, no JavaScript, position a
    >transparent element over the link text and give it a higher z-index so
    >it is "in front of" the link text.[/color]

    Does that also disable the link if the user is navigating with the
    keyboard rather than the mouse?

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

    Comment

    • Karl Smith

      #32
      Re: DYNAMICALLY disable links with CSS?

      Steve Pugh <steve@pugh.net > wrote in message news:
      [color=blue]
      > google-2003-03@kjsmith.com (Karl Smith) wrote:
      >[color=green]
      > >Steve Pugh <steve@pugh.net > wrote:
      > >[color=darkred]
      > >> Mark Johnson <102334.12@comp userve.com> wrote:
      > >>
      > >> >I wanted it simply to be treated as text, even though it is
      > >> >marked up with an anchor tag in the XHTML.
      > >>
      > >> There is no way in CSS to remove the link from an <a> element without
      > >> removing the whole element.[/color]
      > >
      > >To disable a link using only CSS, no JavaScript, position a
      > >transparent element over the link text and give it a higher z-index so
      > >it is "in front of" the link text.[/color]
      >
      > Does that also disable the link if the user is navigating with the
      > keyboard rather than the mouse?[/color]

      I doubt it, but I've never figured out keyboard controls. I wasn't
      really disagreeing with aything you've written here, it's just my
      (accurate, I believe) response to the OP's original query:

      "You have an, a, anchor with href link. Can you use a stylesheet to
      effectively disable the link, so that you can't click on it; that it
      will appear simply as text?"

      But the original question seems to have developed into a moving target
      since then.

      --
      Karl Smith.

      Comment

      • Karl Smith

        #33
        Re: DYNAMICALLY disable links with CSS?

        Steve Pugh <steve@pugh.net > wrote in message news:
        [color=blue]
        > google-2003-03@kjsmith.com (Karl Smith) wrote:
        >[color=green]
        > >Steve Pugh <steve@pugh.net > wrote:
        > >[color=darkred]
        > >> Mark Johnson <102334.12@comp userve.com> wrote:
        > >>
        > >> >I wanted it simply to be treated as text, even though it is
        > >> >marked up with an anchor tag in the XHTML.
        > >>
        > >> There is no way in CSS to remove the link from an <a> element without
        > >> removing the whole element.[/color]
        > >
        > >To disable a link using only CSS, no JavaScript, position a
        > >transparent element over the link text and give it a higher z-index so
        > >it is "in front of" the link text.[/color]
        >
        > Does that also disable the link if the user is navigating with the
        > keyboard rather than the mouse?[/color]

        I doubt it, but I've never figured out keyboard controls. I wasn't
        really disagreeing with aything you've written here, it's just my
        (accurate, I believe) response to the OP's original query:

        "You have an, a, anchor with href link. Can you use a stylesheet to
        effectively disable the link, so that you can't click on it; that it
        will appear simply as text?"

        But the original question seems to have developed into a moving target
        since then.

        --
        Karl Smith.

        Comment

        Working...