Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS to Replace Table Layout for Forms
    primarykey
    data
    text
    <p>I've looked at other questions and am unable to find the solution to this. Consider this image: <a href="http://img201.imageshack.us/img201/935/image2h.png" rel="nofollow noreferrer">mockup http://img201.imageshack.us/img201/935/image2h.png</a> </p> <p>I want to wrap divs and stack them vertically. The GREEN div would be a wrapper on a line. The BLUE div would contain an html label and maybe icon for a tooltip. The ORANGE div would contain some sort of entry (input, select, textarea).</p> <p>Several of these would be stacked vertically to make up a form. I am doing this now, but I have to specify a height for the container div and that really needs to change depending on the content - considering any entry could land there. Images and other stuff could land here, as well.</p> <p>I have a width set on the BLUE div and the ORANGE is float:left. How can I get rid of the height on divs and let that be determined by content? Is there a better way? Changing all to something else would be difficult and would prefer a way to style all elements or something.</p> <p>The code I'm using is like:</p> <pre><code>&lt;div class=EntLine&gt; &lt;div class=EntLbl&gt; &lt;label for="Name"&gt;Name&lt;/label&gt; &lt;/div&gt; &lt;div class=EntFld&gt; &lt;input type=text id="Name" /&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>The CSS looks like:</p> <pre><code>.EntLine { height: 20px; position: relative; margin-top: 2px; text-align: left; white-space: nowrap; } .EntLbl { float: left; width: 120px; padding: 3px 0px 0px 3px; min-width: 120px; max-width: 120px; vertical-align: text-top; } .EntFld { float: left; height: 20px; padding: 0px; width: 200px; } </code></pre>
    singulars
    1. This table or related slice is empty.
    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