Note that there are some explanatory texts on larger screens.

plurals
  1. POForce the second of two side-by-side block elements to fill the parent?
    primarykey
    data
    text
    <p>In designing a data-entry form, I'm finding it difficult to get the second column, "rightcol," in "wrapper" to fill out the remaining space. I succeeded once in getting the child elements to display properly but, using the border-bottom attribute, the border would extend across the <strong>entire</strong> width of wrapper.</p> <p>How can I get "rightcol" to fill out the empty space to the right when the columns are side-by-side? </p> <p>Below, is a mini scrubbed version of my form. Here's a jsFiddler <a href="http://jsfiddle.net/jEfQF/" rel="nofollow">http://jsfiddle.net/jEfQF/</a></p> <pre><code>&lt;style type="text/css"&gt; ul { margin: 0; padding: 0; } li { list-style-type: none; list-style-position: outside; } #row { border-bottom: solid 1px #F00; } #wrapper { width: 100%; display: inline-block; } #leftcol { vertical-align: top; width: 350px; float: left; margin-right: 10px; } #rightcol { vertical-align: top; float: left; } &lt;/style&gt; &lt;ul&gt; &lt;li id="row"&gt;Row 1: &lt;input type="text"&gt;&lt;/input&gt;&lt;/li&gt; &lt;li id="wrapper"&gt; &lt;ul id="leftcol"&gt; &lt;li id="row"&gt;Column A Row 1: &lt;input type="text"&gt;&lt;/input&gt;&lt;/li&gt; &lt;li id="row"&gt;Column A Row 2: &lt;input type="text"&gt;&lt;/input&gt;&lt;/li&gt; &lt;/ul&gt; &lt;ul id="rightcol"&gt; &lt;li id="row"&gt;Column B Row 1: &lt;input type="text"&gt;&lt;/input&gt;&lt;br /&gt;Here's another line in this row.&lt;/li&gt; &lt;li id="row"&gt;Column B Row 2: &lt;input type="text"&gt;&lt;/input&gt;&lt;/li&gt; &lt;li id="row"&gt;Column B Row 3: &lt;input type="text"&gt;&lt;/input&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/ul&gt; &lt;li id="row"&gt;Row 3: &lt;input type="text"&gt;&lt;/input&gt;&lt;/li&gt; &lt;li id="row"&gt;Row 4: &lt;input type="text"&gt;&lt;/input&gt;&lt;/li&gt; &lt;li id="row"&gt;Row 5: &lt;input type="text"&gt;&lt;/input&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre>
    singulars
    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.
    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