Hide or Style specific labels on Forms 2.0

Highlighted
Anonymous
Not applicable

Hide or Style specific labels on Forms 2.0

Hello All!
So I was able to successfully hide form labels, but my form also has a check box (.mktoCheckboxList), which I have to have the actually display the label for, because otherwise it is just a box with no context:
0EM50000000SqQn.jpg

Is it possible to isolate, and style a single label?

Thanks!
Tags (1)
6 REPLIES 6
Highlighted
Level 3

Re: Hide or Style specific labels on Forms 2.0

have you tried something like this in your css
 
.mmktoCheckboxList label.mktoLabel {
display:block;
}
Highlighted
Anonymous
Not applicable

Re: Hide or Style specific labels on Forms 2.0

Hey John!

I have tried similar things, and just tried that, but still no luck 😞
Highlighted
Level 6

Re: Hide or Style specific labels on Forms 2.0

You could use an attribute selector, but it won't help you with older browsers: http://www.w3schools.com/css/css_attribute_selectors.asp
Highlighted
Anonymous
Not applicable

Re: Hide or Style specific labels on Forms 2.0

doing this with jquery would probably be more effective post render. 

$("#ID").css('display','block');

it might give some hint as to why its not working as well, i suggest trying it in the google/firefox javascript console first. 

there is also ways to grab elements by xPath for when they have the same ID/Name..etc
Highlighted
Anonymous
Not applicable

Re: Hide or Style specific labels on Forms 2.0

Thanks all- I'll try these out tomorrow
Highlighted
Level 10 - Community Moderator

Re: Hide or Style specific labels on Forms 2.0

@Devan remember your selectivity rules.  The built-in CSS already has .mktoForm .mktoCheckboxList > label which is more selective than .mktoCheckboxList > label.  You either have to use the same selectivity (yours will win because of the cascade) or use !important.