Search code examples
csswoocommercehook-woocommerce

Hide form labels with CSS on "My Account Page -> Addresses"


Please check on this picture for a betther understanding.

I could hide the input field for Población field which is actualy the shipping_city, for this purpose I used:

#shipping_city {
    display: none;
}

and works!

However, I can not hide the label Población

I tried:

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

With no success


Solution

  • maybe your label tag show with script. So, add '!important' at your css, like this code.

    $("label[for='shipping_code']").show();
    label[for="shipping_code"]{
      display:none;           /* not_woriking */
      display:none!important; /* woriking*/
    }
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    
    <label for="shopping_code">test</label>