title: How to make <div>, <span>, or list display tabular data as a table?
body: <p>First, let me say that I have read other responses on this, and I realize that for tabular data, using tables is the best way to go.  The reason I am needed to use something other than a table is because I am using a jquery plugin (Jquery UI sortable to be exact) that requires certain rows of data to be nested inside of others.  I know of no way to do this with tables, and thus I need to use another element (I am currently using divs).</p>
  
  <p>My data is standard tabular data that is 1 cell per piece of data.</p>
  
  <pre><code>Name  Address     &amp;nbsp;       &amp;nbsp;
  Bob   123 Main    edit_button  drag&amp;drop_button
  Joe   123 Fake    edit_button  drag&amp;drop_button
  Sue   456 Road    edit_button  drag&amp;drop_button
  Ann   123 Street  edit_button  drag&amp;drop_button
  </code></pre>
  
  <p>In this example, dragging Bob will also drag Joe and Sue, Bob's team, with him.  Ann can only be moved on top of the three or below the three, while Joe and Sue can only switch places with each other.</p>
  
  <p>In html, it appears like this.</p>
  
  <pre><code>&lt;div class="table"&gt;
      &lt;div class="header"&gt;Header information&lt;/div&gt;
      &lt;div&gt;
          &lt;div class="row"&gt;Bob's information&lt;/div&gt;
          &lt;div&gt;
              &lt;div class="row"&gt;Joe's information&lt;/div&gt;
              &lt;div class="row"&gt;Sue's information&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;div class="row"&gt;Ann's information&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>To my knowledge, this nesting cannot be done with tables.</p>
  
  <p>I do not need to use divs, if something else would work better.</p>
  
  <p>My question is basically how would I get this information to show up in a tabular format?</p>
  
  <p>Currently, my best guess is to put each element of data, including the headers, in a div with fixed width (and apply borders as needed for appearance), but this means that the 'table' may not resize to best fit the information given.</p>
  
  <p>Another attempt I have made, which is arguably much messier, is to, in each 'row', have a new table with the same setup, which includes a header that is not displayed.  This gives almost the look I want, but some of the spacing is noticeably off if the names are not the exact length.</p>
  
  <p>P.S.
  I hope the actual question is not too specific even though I think my justification for why a table will not work seems a bit too specific.</p>
  
  <p>Edit:</p>
  
  <p>Would there be some way to get the following to work so that a table could still be used?</p>
  
  <pre><code>&lt;table&gt;
      &lt;thead&gt;table header stuff&lt;/thead&gt;
      &lt;tbody&gt;
          &lt;mtne*&gt;
              &lt;tr&gt;Bob's information&lt;/tr&gt;
              &lt;mtne&gt;
                  &lt;tr&gt;Joe's information&lt;/tr&gt;
              &lt;/mtne&gt;
              &lt;mtne&gt;
                  &lt;tr&gt;Sue's information&lt;/tr&gt;
              &lt;/mtne&gt;
          &lt;/mtne&gt;
          &lt;mtne&gt;
              &lt;tr&gt;Ann's information&lt;/tr&gt;
          &lt;/mtne&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>*mtne = mythical table nesting element.</p>
  
  <p>Edit 2:</p>
  
  <p>Upon further testing, I've found that the css styling to make divs behave like tables has the same issue. where if the rows are not placed next to each other, and some are instead nested, they do not share width data.  Due to time constraints, I'm having to just switch to using divs with preset widths.</p>
  
  <p>To anyone else who may come along, there might be some possibility when using <a href="http://ludo.cubicphuse.nl/jquery-plugins/treeTable/doc/index.html#example-1" rel="nofollow noreferrer">treeTables</a>, but I have not yet tested it out and am needing to move on.</p>