php - How to make the parent node to appear in the middle of 2 children regardless of pyramide level? -


this markup:

 <ul>        <li>         <a href="#">root</a>         <ul>            <li>            <a href="#">root</a>            <ul>                <li>                  <a href="#">child 1</a>                </li>                <li>                  <a href="#">child 2</a>                </li>            </ul>            </li>         </ul>        </li>     </ul> 

to this:

                  ________                    |        |                   |  test1 |                   |________|         ________              ________       |        |            |        |       |  test2 |            |  test3 |       |________|            |________|  ________   ________   ________   ________ |        | |        | |        | |        | |  test4 | |  test5 | |  test6 | |  test7 | |________| |________| |________| |________| 

i have php script creates above markup, question how make parent node appear in middle of 2 children regardless of pyramide level?

use table design... design third row yourself

  <table align="center">       <tr margin-left="10px">         <td></td>         <td>           <a href="#">root</a>         </td>       </tr>       <tr>         <td>           <a href="#">root</a>         </td>         <td></td>         <td>           <a href="#">root</a>         </td>       </tr>     </table> 

see example


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -