html - Looking for CSS to replace text or a way to target dynamic DIV/Class ids -


i have unique situation might not solvable css. cant use javascript or jquery, css. dealing web application can edit css. on 1 of form pages application provides want change label of 1 of fields. page has several form fields. problem running div ids forms dynamically derived. every page load changes div id. have html shown below. trying change text "the question" else.

<div class="sm-form-field-overhead" id="yui_3_8_0_1_1378308546310_339"> <label class="sm-label" id="yui_3_8_0_1_1378308546310_340">the question</label> <div class="sm-form-field-container" id="yui_3_8_0_1_1378308546310_231">     <textarea name="question" class="sm-form-field sm-form-field-textarea " id="yui_3_8_0_1_1378308546310_230"></textarea> </div> <div class="sm-form-field-description"></div> 

i can use :before selector add text in front of it, doesnt hide other text , targets every form field on page not form field trying target

.sm-form-field-overhead .sm-label:before { content: "message"; 

}

am out of luck, or think there solution?

here complete , total hack came with

.sm-form-contents .sm-form-field-overhead:nth-child(4) label { color: #242528; padding-left: 182px; } 

this makes existing text same color , shoves right out of way

.sm-contact-pro-form:before { content: "this new text"; position: absolute; top: 215px; left: 200px; } 

this adds new text in place. said, total hack, works now. @shauna got me pointed in right direction. not pretty, works now

hmm tricky one, if wanted little hacky hide label , add content parent div, so:

.sm-label{     display: none; } .sm-form-field-overhead:before {     content: "message"; } 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -