Label user-defined css class

Good morning,

I would like to change the style of a label by setting the classname property.
Unfortunately it does NOT work as expected.
Any hint is highly appreciated.

<style type="text/css">
	.myLabel{
	  color: red;
	  font-weight:100;
	}
</style> 

<script>
  var myForm;
  var formData;
  
  function doOnLoad()	{
	
	formData = [
	{
	type: "label",
	label:"Input field must NOT be empty!",
	labelAlign: "left",
	labelWidth: 300,
	className: "myLabel",
	},
	];
	
	myForm = new dhtmlXForm("myForm", formData);

} //end of function doOnLoad

</script>

<div id="myForm" style="width:280px;height:250px;"></div>

Thank you very much in advance.
Best regards
Juergen Heyn, Wilhelmshaven, Germany

PS: What type of file attachments does this forum accept?

Hi

Try the following css rule:

.dhxlist_obj_dhx_skyblue .myLabel .dhxlist_txt_label2 { color: red; font-weight:100; }

Good evening Andrei,

thank you very much, It works perfectly.

Best regards
Juergen Heyn, Wilhelmshaven, Germany