can't change Textbox background color

I've followed your examples and nothing I do overrides the default textbox background color. How is it done?


On a general note, a lot of your controls have an over reliance on obscure css that could be made easier by having the control simply have a property. ie textbox.backgroundcolor = 'red'.


Sheldon


3 Replies

PK Priyanka Karthikeyan Syncfusion Team June 22, 2023 06:20 PM UTC

Hi Sheldon,

You can meet your requirements by referring to the documentation link below. In the documentation, we have described how to set the background color using CSS style.

https://blazor.syncfusion.com/documentation/textbox/how-to/customize-the-textbox-background-color-and-text-color

If you need any further assistance, we will be happy to help you.

Regards,

Priyanka K



SH Sheldon June 22, 2023 06:28 PM UTC

That example doesn't actually use an SfTextbox - is is it still applicable?



PK Priyanka Karthikeyan Syncfusion Team June 26, 2023 05:20 PM UTC

Hi Sheldon,

You can achieve your requirement by adding the below style. Please find the code snippet and sample for your reference.

.e-input-group, .e-input-group.e-control-wrapper, .e-float-input, .e-float-input.e-input-group, .e-float-input.e-control-wrapper, .e-float-input.e-input-group.e-control-wrapper {

        background: red;

    }


Regards,

Priyanka KA


Attachment: BlazorApp3_21e2fa7d.zip


Loader.
Up arrow icon