Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to align one div to the top and another to the botton of the same cell?
    primarykey
    data
    text
    <p>I'm trying to create a 2 column layout w/ a divder inbetween the columns. My problem is w/ the divider I wish to make. I have markup like the following:</p> <pre><code>&lt;div style="display:table"&gt; &lt;!--Left Column--&gt; &lt;div class = "cell" style="min-width:200px;"&gt; ...content &lt;/div&gt; &lt;!--Divider Column--&gt; &lt;div class="cell vr"&gt; &lt;div class="t"&gt;&lt;/div&gt; &lt;div class="b"&gt;&lt;/div&gt; &lt;/div&gt; &lt;!--Right Column--&gt; &lt;div class="cell" style="width:100%;"&gt; ...content &lt;/div&gt; &lt;/div&gt; </code></pre> <p>CSS:</p> <pre><code>div.cell { display:table-cell; overflow:hidden;vertical-align:top;} /*Vertical Rule*/ .vr {background:url(Img/vGradient.png) repeat-y; width:6px; position:relative;} /*Vertical Rule Gradient*/ .vr .t {background:url(Img/vGradientT.png) repeat-x; width:6px; height:50px; position:absolute; top:0;} /*Top Of Rule*/ .vr .b {background:url(Img/vGradientB.png) repeat-x; width:6px; height:50px; position:absolute; bottom:0;} /*Bottom Of Rule*/ </code></pre> <p>So I'm trying to get the middle cell to have a background image along its full height and then have the top image overlap on top of it at the top and the bottom image of the divider overlap it at the bottom of the cell.</p> <p>Haven't been able to make it work though. Can this be done?</p> <p>UPDATE: This works...but it forces me to assign a height rather than have the divider be as tall as the table needs to be....</p> <pre><code>&lt;div class="cell"&gt; &lt;div class="vr" style="height:300px"&gt; &lt;div class="t"&gt;&lt;/div&gt; &lt;div class="b"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&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.
 

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