Note that there are some explanatory texts on larger screens.

plurals
  1. POHeight of a child div matched to parent
    primarykey
    data
    text
    <p>so I've looked around the site and know there are questions like this, but so many of them are for fluid-width layouts and I cannot get the techniques to work with what I am doing. </p> <p>I am just styling a form, and am having troubles with how the browser resizes. You can see the divs I am working with and my problem in the image below. </p> <p><img src="https://i.stack.imgur.com/eS1HU.png" alt="enter image description here"></p> <p>As you can see, below the <code>.col-1-3</code> div, as the browser resizes, there's a little space that shows up. I would like to match the height of the <code>.col-1-3</code> to that of it's parent, <code>.formInput</code>. </p> <p>Does anyone know anyway to go about doing this? I don't care if it's a hack or some sort of Javascript/jQuery solution. </p> <p><strong>EDIT</strong></p> <p>I'm sure you guys want some code, who wouldn't? </p> <p>Here's some HTML for the first field and label on the form: </p> <pre><code>&lt;div class="formInput"&gt; &lt;div class="grid"&gt; &lt;div class="col-1-3 left"&gt; &lt;label&gt; &lt;p class="right"&gt;AsQ a question &lt;img src="{{ STATIC_URL }}rd/images/arrow_right_small.png" /&gt;&lt;/p&gt; &lt;/label&gt; &lt;/div&gt;&lt;!-- .col-1-3 --&gt; &lt;div class="col-2-3 right"&gt; {{ form.name }} **Django code** &lt;/div&gt;&lt;!-- .col-2-3 --&gt; &lt;/div&gt;&lt;!-- .grid --&gt; </code></pre> <p></p> <p>Here's all of the necessary CSS for said field: </p> <pre><code>.right { float: right: } .left { float: left; } .formInput { border: 6px solid #A5C3D2; display: block; margin-bottom: 25px; behavior: url('./scripts/border-radius.htc'); border-radius: 18px; -moz-border-radius: 18px; -webkit-border-radius: 18px; } .formInput .col-1-3 { background: #006180; color: #FDBA63; text-align: right; behavior: url('./scripts/border-radius.htc'); border-radius: 12px 0 0 12px; -moz-border-radius: 12px 0 0 12px; -webkit-border-radius: 12px 0 0 12px; border-top-left-radius: 12px; border-bottom-left-radius: 12px; } .formInput .col-1-3 label p { width: 220px; } /* Grid */ *, *:after, *:before { box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; } .grid:after { clear: both; content: ""; display: table; } /* Grid Gutters */ [class*='col-'] { float: left; padding-right: 20px; } [class*='col-']:last-of-type { padding-right: 0; } .col-2-3 { width: 66.66%; } .col-1-3 { width: 33.33%; } </code></pre> <p>If you guys want to see a working example of my problem: <a href="http://jsfiddle.net/qMgwz/" rel="nofollow noreferrer">http://jsfiddle.net/qMgwz/</a></p>
    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.
 

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