Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 78072

Set color of checkbox text

$
0
0

Recently I submitted a support ticket to find out how I could change the color of the text of a RadCheckBox. I'm not as fluent in css as I should be so I thought I would share my findings for others like me with limited css skills.

To change the color of the text of all checkboxes on the page create the following css rule

<style>
    .rbText  {
       color: red !important;
    }
</style>

If you need to change the color of only some checkboxes (in my case I have a couple that are required and I wanted to make the red leaving all others black) you can create a rule that looks like this

<style>
    .required .rbText  {
       color: red !important;
    }
</style>

and then assign the required css class to the checkbox like this

<telerik:RadCheckBox ID="blnCorrectiveAction" runat="server" Text="Corrective Action Necessary" CssClass="required"></telerik:RadCheckBox>

I'm sure the css pros think this is silly simple thing so say but for those of us that struggle I hope this helps 


Viewing all articles
Browse latest Browse all 78072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>