Change RadButton Background Color

4 posts, 0 answers
  1. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 26 Sep 2014 Link to this post

    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?
  2. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 29 Sep 2014 Link to this post

    Anyone??
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 01 Oct 2014 Link to this post

    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.

     
  5. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 01 Oct 2014 in reply to Danail Vasilev Link to this post

    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.
Back to Top