PDA

View Full Version : How to change the css of FieldLabel in TextField?



brunonandolpho
26 May 2009, 5:33 AM
Hi guys,
I have a form and some input are required
i want to change the FieldLabel to color red...but only the Field label..like below

Name: _________

my code is below..label-required is a .css style



TextField<String> name = new TextField<String>();

name .setName("name");
name .setFieldLabel("Name");
name .setAllowBlank(false);
name.setStyleName("label-required");
form.add(name );


-------------
css

.label-required {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: red;
}




But, with this code, the inputext get the red color..and my first label still default color...any ideia?..

thanks for help