Note that there are some explanatory texts on larger screens.

plurals
  1. POYet Another Divs vs Tables issue: Forms
    primarykey
    data
    text
    <p>[Meta-note:] I was browsing the question page, getting really tired of "DIVS vs Tables" "When to use tables vs DIVS" "Are Divs better than Tables" "Tables versus CSS" and all the questions that ask <em>THE SAME THING OMG PEOPLE</em> but I would like to see all the ways people tackle the translation of the canonical example of "why you should give up and use tables":</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td&gt; Name &lt;/td&gt; &lt;td&gt; &lt;input&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Social Security Number &lt;/td&gt; &lt;td&gt; &lt;input&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p><b> Question: </b> How to best (semantically, simply, robustly, fluidly, portably) implement the above without tables. For starters, I guess a naive implementation uses a fixed column width for the first column, but that can have iffy results for dynamically generated content. Including strengths/weaknesses of your approach in the answer would be nice.</p> <p>P.S. Another one I wonder about a lot is vertical centering but the hack for that is covered pretty well at <a href="http://www.jakpsatweb.cz/css/css-vertical-center-solution.html" rel="nofollow noreferrer">jakpsatweb.cz</a></p> <p>EDIT: scunlife brings up a good example of why I didn't think out the problem that carefully. Tables can align multiple columns simultaneously. The Question still stands (I'd like to see different CSS techniques used for alignment/layout) - although solutions that can handle his? more involved example definitely are preferred.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload