css - Don't display element label, but display element in a nested html form -
on php-generated site, have html source code like
<label for="fieldname"> label text <input id="fieldname" class="textfield" (...) name="fieldname"></input> </label> my problem want set display: none label text, input field should still displayed. css available, can't change html structure.
i tried setting display: nonefor label node, , afterwards display: block !importantfor input field, did not work. neither can reference text itself, because not included in <p>or this. solutions found label node using for: attribute, there input node not contained inside label node.
as far know, there no way make child element of display:none visible... can try use visibility attribute.... disadvantage is, width of hidden element stays.. because of that, made input overlap.
hope helps starting point!
label { visibility: hidden; } input { left: 0; visibility: visible; position: absolute; } <label for="simplequery"> label text <input id="simplequery" class="textfield" (...) name="simplequery"></input> </label>
Comments
Post a Comment