RE: CSS Styling TreeView
- From: "Homme, James" <james.homme@xxxxxxxxxxxx>
- To: "programmingblind@xxxxxxxxxxxxx" <programmingblind@xxxxxxxxxxxxx>
- Date: Mon, 29 Jun 2009 12:37:15 -0400
Hi Rick,
I don't think CSS is the answer because it doesn't have control structures.
Perhaps JavaScript and manipulating the various style properties is an answer
if you can find out whether an item is a child or a parent. You'd have to come
up with some way of knowing the relationships as you were building the pages.
T
Hanks.
Jim
----------
Jim Homme
Usability Services
412-544-1810
james.homme@xxxxxxxxxxxx
"You can do anything you want to if you put your mind to it" -- Jim Homme Sr.
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of RicksPlace
Sent: Monday, June 29, 2009 11:41 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: CSS Styling TreeView
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
________________________________
This e-mail and any attachments to it are confidential and are intended solely
for use of the individual or entity to whom they are addressed. If you have
received this e-mail in error, please notify the sender immediately and then
delete it. If you are not the intended recipient, you must not keep, use,
disclose, copy or distribute this e-mail without the author's prior permission.
The views expressed in this e-mail message do not necessarily represent the
views of Highmark Inc., its subsidiaries, or affiliates.
Other related posts: