Hide specific form label

Discussion in 'CSS' started by bellcom, Dec 8, 2013.

  1. #1
    I have a form used on several pages but on one specific page I want to hide a couple of the non-required fields.

    I have something like this:
    <label for="field_6">My Label Text: </label>
    <input id="field_6" type="text" value="" name="field_6">

    I to hide the input field I use
    #field_6 {display: none;)
    How would I hide the label for field_6 and keep all other fields visible?

    The form is automatically generated by a plugin in wordpress so I can't easily add anything to the html.

    thanks!!
     
    Solved! View solution.
    bellcom, Dec 8, 2013 IP
  2. #2
    try this
    label[for="field_6"] {
    display: none;
    }

    or give that label a class or an id if possible.
     
    homer7, Dec 8, 2013 IP
  3. bellcom

    bellcom Well-Known Member

    Messages:
    220
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Worked perfectly, thanks homer!!
     
    bellcom, Dec 8, 2013 IP