1

I can create a dynamic table with <ul> and <li> wich adjusts sizes of columns depending on content.

but the proble is that when I apend a nested table inside a row, this nested table appears on the right of the row instead on bottom.

this is the structure:

<li>
  <div></div>
  <div></div>
  <div></div>
  <ul>
     <li>
       <div></div>
       <div></div>
       <div></div>
     </li>
  </ul>
</li>

Here is the full HTML and CSS code:

http://jsfiddle.net/F9mXv/25/

how can I put the nested table under the row?

Thanks!!!

Pedro Justo
  • 3,969
  • 1
  • 17
  • 21

2 Answers2

1

You need to wrap the new UL inside a div somewhere

    <li>
       <div class="div-cb">
            <input type="checkbox" value="on" />
        </div>

        <div>
            <ul class=" query_list_table sub_list_table">
                    <li class="header">
                        <div>AAAAA</div>
                        <div>BBBB</div>
                        <div>CCCCCCC</div>
                        <div>DDDD</div>
                    </li>

                    <li>
                        <div>XXXXXXXX</div>
                        <div>YYYYYYYYYY</div>
                        <div>ZZZZZZZZZZZZZZZZZZ</div>
                        <div>WW</div>
                    </li>

                     <li>
                        <div>XXXXXXXX</div>
                        <div>YYYYYYYYYY</div>
                        <div>ZZZZZZZZZZZZZZZZZZ</div>
                        <div>WW</div>
                    </li>

                     <li>
                        <div>XXXXXXXX</div>
                        <div>YYYYYYYYYY</div>
                        <div>ZZZZZZZZZZZZZZZZZZ</div>
                        <div>WW</div>
                    </li>
                 </ul>
        </div>
    </li>

http://jsfiddle.net/F9mXv/26/

One thing I don't know how to do is to replicate the "colspan" behaviour with this. as you can see it 's in the first cell and make it wider.

SeraphimFoA
  • 446
  • 4
  • 11
  • Thanks, your solution is fine, but what made difference was enclosuring the nested ul in
  • . You did that, but @GentlePurpleRain explanation mentioned it. – Pedro Justo Aug 29 '14 at 15:16