CSS I am trying to hide this:

How to hide <label for = ""> CSS

I am trying to hide this:

<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

+5
source share
3 answers
 label[for="secondname"] { display:none; } 
+5
source

Use the attribute selector:

 label[for="secondname"] { display: none; } 
+6
source

You can use label[for="secondname"] { display: none }

+1
source

Source: https://habr.com/ru/post/1258178/


All Articles