How do you make text invisible in html?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zeroblade
    New Member
    • Oct 2007
    • 8

    How do you make text invisible in html?

    I want to make the text invisible until the user presses a button, after which the text would appear. How would I make the text invisible?
  • pedalpete
    New Member
    • Oct 2007
    • 109

    #2
    the best way to do this this with a click is to use javascript. to set the visibility of an element.

    I personally use the jquery library which I find really easy to use, and efficient.

    What you want to do is
    1) in your css, set the element containing the hidden text to "visibility : hidden", or "display: none;"

    2) have your javascript say 'when element is clicked, change css to "visibility : visible; " or "display: block;"

    here's a link that should get you started.
    http://blog.go-test.net/2006/09/04/simple-showhide-blocks-with-javascript/

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      Or skip the javascript and just say a:visited{visib ility:visible}

      Comment

      Working...