Note that there are some explanatory texts on larger screens.

plurals
  1. POPlacing Divs side by side, with equal column heights, inside ContentPlaceHolder in ASP.NET
    primarykey
    data
    text
    <p>I'm trying to have three columns. The left and right columns contain a button and these buttons should stay on a fixed alignment to the outside border of the container. The center column contains an <code>asp:Table</code> that is created dynamically and have everything from 1 row and 1 column to 6 rows and 7 columns.</p> <p>I've tried to follow <a href="http://www.alistapart.com/articles/holygrail" rel="nofollow noreferrer">this CSS example</a> which ultimately becomes this site: <a href="http://www.alistapart.com/d/holygrail/example_3.html" rel="nofollow noreferrer">http://www.alistapart.com/d/holygrail/example_3.html</a>, and I've gotten the <code>div</code>s to be side by side - but I can't get the left and right columns to align vertically or have equal heights with the center div tag, which I'm guessing is the same thing.</p> <p>I don't know if it matters but my divs are inside a <code>ContentPlaceHolder</code> in an ASP <code>Page</code>.</p> <p><strong>Here's my code:</strong></p> <pre><code>&lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&gt; //Container to the three columns &lt;div id="calendarContainer"&gt; //The left button container &lt;div id="navigateButtonLeft" class="calendarColumn"&gt; &lt;asp:Button ID="btnLeftMonth" runat="server" Text="&lt;" onclick="btnLeftMonth_Click" /&gt; &lt;/div&gt; //The table/month-calendar container &lt;div id="calendar"class="calendarColumn"&gt; &lt;asp:Table ID="TableMonthCalendar" runat="server" GridLines="Both" /&gt; &lt;/div&gt; //The right button container &lt;div class="calendarColumn"&gt; &lt;asp:Button ID="btnRightMonth" runat="server" Text="&gt;" onclick="btnRightMonth_Click" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/asp:Content&gt; </code></pre> <p><strong>and my CSS (probably worthless):</strong></p> <pre><code>#calendarContainer { overflow:hidden; border: 1px solid black; } #calendarContainer .calendarColumn { padding-bottom: 1001em; margin-bottom: -1000em; border: 1px solid black; overflow:hidden; float:left; } #navigateButtonLeft { } #calendar { width: 80%; } #navigateButtonRight { } </code></pre> <p>I previously used a <code>table</code> with a <code>tr</code> and three <code>td</code>s, but I couldn't get it to be the way I wanted.</p> <p>Here's an illustration of what I want to achieve, which is probably better than my explanation: <img src="https://i.stack.imgur.com/87ASQ.png" alt="design goal"></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