Hiding Form Objects

Discussion in 'CSS' started by Letcha, Dec 17, 2008.

  1. #1
    I have a checkbox in a form that I want to hide. I can't do type="hidden" because type is already set to type="checkbox". Can I use CSS to hide this checkbox effectively in all browsers? Thanks in advance.
     
    Letcha, Dec 17, 2008 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    If it's to be hidden, why do you need a widget? Set the type to "hidden", and be done with it.

    cheers,

    gary
     
    kk5st, Dec 17, 2008 IP
  3. Crimsonc

    Crimsonc Peon

    Messages:
    616
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Why would you hide a checkbox? surely the point is to give the user the option of checking it. I suspect your trying to achieve something but going about it the wrong way, why are you trying to hide it?
     
    Crimsonc, Dec 19, 2008 IP
  4. abcdefGARY

    abcdefGARY Well-Known Member

    Messages:
    665
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #4
    Um, you can hide it without setting the "type=hidden" in CSS:

    
    input {
         display: none;
    }
    Code (markup):
    or

    
    input {
         visibility: hidden;
    }
    
    Code (markup):
    I think that was what you were trying to ask...?
     
    abcdefGARY, Dec 19, 2008 IP