This is a migrated thread and some comments may be shown as answers.

Change RadButton Background Color

3 Answers 1148 Views
Button
This is a migrated thread and some comments may be shown as answers.
DogBizPro
Top achievements
Rank 1
DogBizPro asked on 26 Sep 2014, 07:24 PM
I am trying to change the background color of a RadButton using CSS but it is not working...

Button Code:
<telerik:RadButton SingleClick="true" SingleClickText="Submitting..." ButtonType="LinkButton" CssClass="btnY" runat="server" ID="btn" Width="60" Text="Submit" OnClick="btn_Click" />

CSS:
.btnY{font-weight:bold;font-size:9pt;background-color:#abbc37;border:1px solid #788604;color:#fff;text-align:center;padding-right:5px;padding-left:5px;padding-top:0px;padding-bottom:0px;line-height:18px;}

What am I missing?

3 Answers, 1 is accepted

Sort by
0
DogBizPro
Top achievements
Rank 1
answered on 29 Sep 2014, 05:29 PM
Anyone??
0
Danail Vasilev
Telerik team
answered on 01 Oct 2014, 11:17 AM
Hello Stephanie,

You must make the selector heavier. For example:

CSS:
<style>
    html .RadButton.RadButton_Default.rbLinkButton.btnY {
        font-weight: bold;
        font-size: 9pt;
        background-color: #abbc37;
        border: 1px solid #788604;
        color: #fff;
        text-align: center;
        padding-right: 5px;
        padding-left: 5px;
        padding-top: 0px;
        padding-bottom: 0px;
        line-height: 18px;
    }
</style>
ASPX:
<telerik:RadButton SingleClick="true" SingleClickText="Submitting..." ButtonType="LinkButton" CssClass="btnY" runat="server" ID="btn" Width="60" Text="Submit" OnClick="btn_Click" />



Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
1
DogBizPro
Top achievements
Rank 1
answered on 01 Oct 2014, 02:35 PM
Okay, the problem is we have over 300 different individual .css files for the 'skinned' sites of our customers. So I have to do that 300 time....guess that won't be happening. Thanks anyway.
Tags
Button
Asked by
DogBizPro
Top achievements
Rank 1
Answers by
DogBizPro
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or