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

Overriding the default style for <li> tags

1 Answer 45 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 30 Jun 2009, 11:14 AM
Hi all,

I had problems on all browsers with my Telerik tree looking untidy and out of alignment until I remembered that the overall style-sheet for my site has a default style for the <li> tag, namely:

li
{
    padding: 3px 2px 5px 2px;
}

The tree makes heavy use of <li> tags but for some reason doesn't override the default styling, so I had to do it manually in the HTML of the control.ascx file that contained the tree:

<style type="text/css">
/* UNDO standard <li /> styling for the Telerik tree */
li
{
    padding: 0px !important;
}
</style>
<telerik:RadTreeView ID="rtvSearchResults" runat="server" DataTextField="VariableName" style="white-space: normal;">

Telerik, any chance this could be fixed in a future release?  (Or it in fact not possible to "fix" this, in which case could we have it highlighted in the documentation?)

Ed Graham

1 Answer, 1 is accepted

Sort by
0
Kamen Bundev
Telerik team
answered on 30 Jun 2009, 02:28 PM
Hi Ed,

We can't possibly predict and override every CSS property there is for every element in our controls. Please don't use global styles

Best wishes,
Kamen Bundev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
TreeView
Asked by
Ed
Top achievements
Rank 1
Answers by
Kamen Bundev
Telerik team
Share this question
or