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

Color inheritance

3 Answers 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
macBlack
Top achievements
Rank 1
macBlack asked on 22 Sep 2011, 02:27 PM
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

3 Answers, 1 is accepted

Sort by
0
Stuart Hemming
Top achievements
Rank 2
answered on 22 Sep 2011, 03:13 PM
I've not tried this, but have you seen what happens if you set the skin on the RadTextBox to "Transparent"?

-- 
Stuart


0
macBlack
Top achievements
Rank 1
answered on 22 Sep 2011, 03:20 PM
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
0
Stuart Hemming
Top achievements
Rank 2
answered on 22 Sep 2011, 03:50 PM
You're right, I mis-read what it is you're trying to do.

Sorry.

-- 
Stuart
Tags
General Discussions
Asked by
macBlack
Top achievements
Rank 1
Answers by
Stuart Hemming
Top achievements
Rank 2
macBlack
Top achievements
Rank 1
Share this question
or