Home - Forums-.NET - FlyTreeView (ASP.NET) - Style Sheet Issues

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Style Sheet Issues
Link Posted: 24-Feb-2009 01:11
I am having a problem with my style sheets (Tree.jpg)


                                            BorderColor="Silver" ExpandLevel="4" BorderWidth="1px" Height="100%" Width="400px"
                        Padding="0px" EnableFullRowEvents="True" OnNodeSelected="flyTreeView2_OnNodeSelected"
                        OnDropJavascript="flyTreeView2_OnDrop" OnDragOverJavascript="flyTreeView2_OnDragOver"
                        OnDragOutJavascript="flyTreeView2_OnDragOut" PostBackOnDropAccept="True" PostBackOnSelect="true"
                        CssClass="tree">
                                                     RowHeight="18px" />
                        
                        
                    



.tree
{
  width: 400px;
}

.tree .DefaultStyle
{

}

.SelectedStyle
{

}

.HoverStyle
{

}


So it's all fairly standard, but I suspect that some of my styles for the site are conflicting with it and adding Padding or Margins.

Now I have made sure there are no styles for Lists, Ordered Lists or Un-OrderedLists etc.

Any help would be much appreciated.
Link Posted: 24-Feb-2009 07:39
I took your code, put it into standard vista demo:
    BorderColor="Silver" BorderWidth="1px" Height="100%" Width="400px"
    Padding="0px" EnableFullRowEvents="True" OnPopulateNodes="flyTreeView_PopulateNodes"
    PostBackOnDropAccept="True" PostBackOnSelect="true" CssClass="tree">
    
    
    

Get this:

What am I doing wrong?
Link Posted: 24-Feb-2009 22:02
I took that from the samples. The problem is with my stylesheets, and how it is impacting on the Tree even if I specify the what Classes.

So I suspect when the control controls final style is being affected by my style sheet after the ASPX page is open. Is there any tags that this is output as? Any embedded styles that I need to note?

I can change my stylesheet around so that It doesn't impact the Tree, but I need to narrow it down as my StyleSheet is rather big.
Link Posted: 25-Feb-2009 00:26
Sure FlyTreeView produces some CSS rules (see .nrfXXX CSS classes at the HEAD section).
From my point of view, the best way to adjust style for selected element (it may be treeview node element or any other element) is to use Firebug (personally I use it as a Firefox user) or IE Dev Toolbar. These tools let you inspect particular element and see what styles from what rules are applied. And even add your own style settings to see how they affect element appearance (so that later you can just use them in a new CSS rule).