making text non-selectable

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

    making text non-selectable

    Hello,
    I am trying to make a menu for a html page and I am using DIV tags for
    buttons. I don't like the idea of being able to select the text, is
    there a way I can change this behaviour to make the text
    non-selectable?

    Advice for any browser appreciated.
    TIA
    Paul.
  • DU

    #2
    Re: making text non-selectable

    Paul wrote:[color=blue]
    > Hello,
    > I am trying to make a menu for a html page and I am using DIV tags for
    > buttons. I don't like the idea of being able to select the text, is
    > there a way I can change this behaviour to make the text
    > non-selectable?
    >
    > Advice for any browser appreciated.
    > TIA
    > Paul.[/color]


    DOM 2 Events method
    evtObj.preventD efault();
    will avoid selecting the text when clicking on those <div>s for W3C DOM
    2 Events compliant browsers (Mozilla 1.x, Opera 7.x, Safari 1.x, etc) while
    event.returnVal ue = false;
    will avoid selecting the text when clicking on those <div>s in MSIE 5+
    browsers.

    DU

    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: making text non-selectable

      Paul wrote:
      [color=blue]
      > I am trying to make a menu for a html page and I am using DIV tags for
      > buttons. I don't like the idea of being able to select the text, is
      > there a way I can change this behaviour to make the text
      > non-selectable?[/color]

      Nothing standards compliant and thus nothing cross-browser. Atigs.


      PointedEars

      Comment

      Working...