S
schneider
Hi all,
I'm trying to create a nice navigation for an asp.net 2.0 website.
What I want to do is use css to define the look of the tree. My
problem is that I cannot set margins or paddings via css. I want to
create a gap between top-level nodes, however not between a top-level
node and its first child (which I set always visible). I defined css
classes like "navi_level0", "navi_level1", ... in my css file and set
the CssClass properties in the corresponding TreeNode's LevelStyles.
Applying colors, font-sizes etc. works fine, but since the TreeView
control does only render my previously defined css classes to the <td>
elements and not to any enclosing <div> or <table> tags, I remain
helpless with css since I can define margin only for <table> and <div>
tags.
My next approach was using the VerticalPadding, NodeSpacing and Height
properties of the corresponding LevelStyle. But here, the value is
applied both at the top and at the bottom of the element, rendering a
gap above AND below each top-level node. Is there any workaround or is
this control not css formattable?
Would it be possible to create a custom class derived from the
TreeView class?
Thanks in advance.
Cheers, Hannes.
I'm trying to create a nice navigation for an asp.net 2.0 website.
What I want to do is use css to define the look of the tree. My
problem is that I cannot set margins or paddings via css. I want to
create a gap between top-level nodes, however not between a top-level
node and its first child (which I set always visible). I defined css
classes like "navi_level0", "navi_level1", ... in my css file and set
the CssClass properties in the corresponding TreeNode's LevelStyles.
Applying colors, font-sizes etc. works fine, but since the TreeView
control does only render my previously defined css classes to the <td>
elements and not to any enclosing <div> or <table> tags, I remain
helpless with css since I can define margin only for <table> and <div>
tags.
My next approach was using the VerticalPadding, NodeSpacing and Height
properties of the corresponding LevelStyle. But here, the value is
applied both at the top and at the bottom of the element, rendering a
gap above AND below each top-level node. Is there any workaround or is
this control not css formattable?
Would it be possible to create a custom class derived from the
TreeView class?
Thanks in advance.
Cheers, Hannes.