Color inheritance

4 posts, 0 answers
  1. macBlack
    macBlack avatar
    3 posts
    Member since:
    May 2010

    Posted 22 Sep 2011 Link to this post

    Hi newb here,

    I'm guessing most of you will answer this in a heartbeat for for us newbies?

    I have a simple test app that has one div that has no style except "color:red" and I have a RadNumericTextBox with the label property set. I expected the RadNumericTextBox to inherit the style (color:red) from its parent being the div to get a red label, but instead the label is black.

    I know I can specify a LabelCssClass and specify the color but this leads to a more complex css structure (ie. I want to use the style with different colors without duplicating the code).

    I've even tried specifying a css class that enforces the "color:inherit" with no sucess:

    CSS

    .colInherit

    {

    color:inherit;

    }


    HTML

    <div style="color:Red">

        <telerik:RadNumericTextBox ID="RadTextBox1" runat="server" Label="Tester" LabelCssClass="colInherit" >
        </telerik:RadNumericTextBox >

    </div>

    Thanks in advance...

    Andy

  2. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 22 Sep 2011 Link to this post

    I've not tried this, but have you seen what happens if you set the skin on the RadTextBox to "Transparent"?

    -- 
    Stuart


  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. macBlack
    macBlack avatar
    3 posts
    Member since:
    May 2010

    Posted 22 Sep 2011 Link to this post

    Hi stuart,

    I don't have a transparent skin, I haven't specified one so I assumed it would be the default one. Wouldn't the skin affect affect the control and not the label?

    Andy
  5. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 22 Sep 2011 Link to this post

    You're right, I mis-read what it is you're trying to do.

    Sorry.

    -- 
    Stuart
Back to Top