Search code examples
csslabelhide

How to hide <label for=""> CSS


I am trying to hide these:

<p>
<label for="secondname"><?php esc_html_e('Last Name','wpestate');?></label>
<input type="text" id="secondname" class="form-control" value="<?php echo $last_name;?>"  name="firstname">
</p>

I managed to hide the Input, but not the label.

#secondname {
  display: none;
}

Thanks


Solution

  • label[for="secondname"]
    {
        display:none;
    }