Textfield's text color

Hello

I am turning around for hours. I have a simple problem : how can we change the color of the text of a textfield ?
I tried to use the next CSS code but it doesn’t work :

.v-textfield
{ color: red; }

Has anyone got a solution ?

Best regards.

Hi,

The problem is that your style is overriden by a more specific Vaadin style. You have to use a more specific CSS selector. Try, for example, the following:

.v-app input.v-textfield { 
	color: red;
}

-Henri

Great ! Thanks a lot Henri, it perfectly works !
Now, i would like to apply it to disabled textfields. I succeeded in removing the opacity (following code) but I still can’t change the color of the text :

.v-textfield.v-disabled,
.v-textarea.v-disabled
{ filter: none; opacity: 1; }

A solution ?

I think that this is the same issue as above, so try:

.v-app input.v-textfield.v-disabled {
	...	
}

You can use Firefox and Firebug to see which style is applied to a element.

-Henri

Yes, it is ok with FF but not with Internet Explorer !
Do you know how to make it run with IE ?

Kevin

Here are all the relevant selectors that affect the color of the text field:


.v-app input,
.v-app textarea,
.v-window input,
.v-window textarea,
.v-popupview-popup input,
.v-popupview-popup textarea

It’s probably one or all of those that you want to override. The disabled state does not affect the color of the text, so no need to provide an additional override for that.

Hope this helps!

Yes, it works well with firefox but not with IE.

Thanks,
Kevin.

You can use Firefox and Firebug to see which style is applied to a element.


Removed spam link by admin

, i would like to apply it to disabled textfields. I succeeded in removing the opacity (following code) but I still can’t change the color of the text :


Spam link removed from post body by admin