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

Override Default Styles

1 Answer 119 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ramjet
Top achievements
Rank 1
Ramjet asked on 12 Jul 2011, 05:36 PM
Hello,

Maybe I don't understand correctly but I thought that I could override the default css styling....?? For example
telerik:RadTreeView ID="MyAppsTreeView" runat="server" CheckBoxes="True" TriStateCheckBoxes="true" CheckChildNodes="true" Skin="Windows7">
    <Nodes>
        <telerik:RadTreeNode Text="Centura Health Resource" Expanded="true" CssClass="CategoryNode">
            <Nodes>........

and I have a css file:
.CategoryNode
{
    width: 186px !important;
    height: 35px !important;
    background: transparent url('../images/PhysSteth.png') no-repeat !important;
}

The image displays as it should but the width and height do not???

Any help would be greatly appreciated.



1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Jul 2011, 06:23 AM
Hello John,

By default the nodes are inline elements which means they don't have width. You can try adding this CSS rule in your page to make the nodes inline-block elements:
CSS:
<style type="text/css">
div.RadTreeView span.rtIn
{
   display:inline-block;
}
</style>

Now you can set the width.

Thanks,
Shinu.
Tags
TreeView
Asked by
Ramjet
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or