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

CSS not working for RadPanelItem

1 Answer 106 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Shamim
Top achievements
Rank 1
Shamim asked on 08 Sep 2010, 09:59 PM
Hi,
I have the following radpanelbar in the code:

<

 

head runat="server">

 

 

<title></title>

 

 

 

<link href="../App_Themes/Default/main.css" rel="stylesheet" type="text/css" />

 

</

 

head>

 


<body>

 

<telerik:RadPanelBar ID="RadPanelBar1" runat="server" ExpandMode="FullExpandedItem"

 

 

Skin="Vista" Width="300px" Height="700px" >

 

 

<Items >

 

 

<telerik:RadPanelItem runat="server" Text="0. Instructions on Setting up Client" Value="0"

 

 

Font-Size="12" ChildGroupCssClass="PanelChildBackGround">

 

 

<Items >

 

 

<telerik:RadPanelItem runat="server" Text="Instructions on Client" Font-Bold="true" Font-Size="11" ForeColor="#0f68c2"

 

 

 

>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

 

 

 

</telerik:RadPanelBar>

</body>

 

 

 

 

 

 

But unfortunately the ChildGroupCssClass property is not working, in other words, radpanelchild item is not taking the css behavior. If I am missing anything please let me know. Thanks. 


1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 09 Sep 2010, 07:32 AM
Hello Shamim,


Have you added !important modifier to the styles in order to override the default settings? I got it worked after I add "!important" as shown below.

css:
<head runat="server">
    <style type="text/css">
        .PanelChildBackGround
        {
            background-color: Green !important;
        }


But still for setting some styles, I used CssClass for each child item, since the ChildGroupCssClass didnt work as expected. Here is the alternate I tried.
css:
<style type="text/css">
    .PanelChildBackGround
    {
        background: #ccd !important;
        color: Green !important;
    }
</style>


aspx:
. . .
<telerik:RadPanelItem Text="0. Instructions on Setting up Client" Value="0" Font-Size="12">
     <Items>
         <telerik:RadPanelItem CssClass="PanelChildBackGround" runat="server" Text="Instructions on Client">
         </telerik:RadPanelItem>
           . . .
     </Items>



-Shinu.
Tags
PanelBar
Asked by
Shamim
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or