Reputation: 115
Trying to hide an element in the WooCommerce plugin for Wordpress. Basically it's on the check out page and it says "State" and I want to hide it because the drop down box already says "Select State." I open Firebug and saw that the text "State" is not part of a class or anything. It looks like this:
<label class="" for="billing_state">
State
<abbr class="required" title="required">*</abbr>
</label>
I tried adding this in my CSS but it didn't work
label [for="billing_state"]{
display: none;
}
Upvotes: 1
Views: 263
Reputation: 66324
You can select a node with an empty class attribute <span class="" />
using
span[class=""] {
border: 3px solid red;
}
You can select a node with explicitly no class attribute <span />
using
span:not([class]) {
border: 3px solid blue;
}
Upvotes: 0
Reputation: 38252
Your CSS works just remove the space between label
and the [selector]
:
label[for="billing_state"]{
display: none;
}
The demo http://jsfiddle.net/6hKPL/
Upvotes: 2
Reputation: 75317
There shouldn't be a space between the label
and the [
; otherwise you're searching for elements which are descendants of a label
, which match [for="billing_state"]
.
label[for="billing_state"]{
display: none;
}
Upvotes: 1