CSS Styling TreeView
- From: "RicksPlace" <ofbgmail@xxxxxxxxx>
- To: <programmingblind@xxxxxxxxxxxxx>
- Date: Mon, 29 Jun 2009 11:41:12 -0400
Hi: I am trying to specify css classes for the nodes in a ASP treeview. I want
to indent each child node 100px from it's parent node. There may be several
levels and the actual number of levels is unknown. I have used margin-left to
set the node positions but if I indent a parent node say 100px and a childnode
say 200px the first level is fine. If there are say parent nodes inside another
parent node then the parent nodes are not offset relative to it's parent node
if that makes sense. For example:
A structure:
Cars:
Makes:
Ford
Chevy
Trucks:
Ford
Chevy
would be ok since there is only 1 parent level and one child level under the
parent levels.
The Cars and Trucks parents are offset 100px from the left of the TreeView
container.
Cars:
Domestic:
makes:
Ford
Chevy
The 2 nested parent elements are both indented 100px where the nested Cars
should be indented 200px.
Then the Ford and Chevy should be indented 300px.
How would I use css to accomplish something like this for a general TreeView
where the number of nested parents is unknown? And, each nested parent node
should be indented relative to it's parent node and the leaf node indentented
after the final branch (parent) node.
the prior parent if neste
Rick USA
Other related posts: