I have a text area tag, wanted to write water mark functionality. So, i have assigned a class (css) to that tag. but it is not getting recognised. if i write css style for the textarea ID it is working.
function renderhtml(subgrid_id, row_id) {debugger;
var script = "<div style='margin-left:10px; margin-top:10px; margin-bottom:10px;'>";
script += "<textarea cssClass=watermarkOn cols=20 id=txtCommentSection name=txtCommentSection rows=2>Type your comments here</textarea>";
script += "<input type='image' id='image' src='../../Content/Images/commentIcon.png'/>";
script += "</div>";
return script;
}
This is the css style:
.watermarkOn{color: #CCCCCC; font-style: italic;width:800px; height:30px; }
i have tried changing the class from “cssClass” to just “class” but still the style is not getting affected.
Please help.
This line is the culprit.
It should be: