Hi, I have a binary tree in unordered list that looks like this:
<ul>
<li>1
<ul>
<li>2
<ul>
<li>4
<ul>
<li>8</li>
<li>--</li>
</ul>
</li>
<li>5</li>
</ul>
</li>
<li>3
<ul>
<li>6</li>
<li>7</li>
</ul>
</li>
</ul>
</li>
Where -- is a empty space (to differ left/right child).
It displays as a classic unordered list. But that's hard to read and navigate through. I need a horizontal tree that looks like this:
http://www.knowledgerush.com/wiki%5Fimage/d/df/Binary%5Ftree.png
It can be with or without the lines between the nodes.
My question is - can this be done via html/css alone or do I need to use javascript for this?