stemming from this question
This first image is with no overflow. The top is before I press the button, and the bottom is after.
alt text http://img19.imageshack.us/img19/7594/nooverflow.png
And this image is with overflow:auto. The top is before I press the button, and the bottom is after.
alt text http://img134.imageshack.us/img134/4015/overflow.png
What I’m looking for is the panel to look like it does in the first image before I press the button, and what it looks like in the 2nd image when I do press the button.
Here’s a copy of the relevant code:
<asp:Panel ID="pnlCustomer" runat="server" style="background-color:#ccccff; width:500px; height:90%; position:relative;" BorderColor="DarkBlue" BorderWidth="2px">
...
<style>
div.textboxArea {
text-align:center;
float:left;
width:40%;
margin-top:35px;
}
.textboxArea TextBox {
width:80%;
}
.centerMeVertically div {
position:absolute;
top:50%;
vertical-align:middle;
height:30px;
width:100%;
margin-top:0px;
text-align:center;
}
div.centerMeVertically {
float:left;
width:20%;
text-align:center;
height:60px;
position:relative;
}
p {
margin:-35px 0 0 0;
}
.container {
margin-top:10px;
margin-bottom:10px;
overflow:auto;
}
</style>
<div class="container">
<div style="width:100%;">
<div class="textboxArea">
<p><asp:Label runat="server" ID="lblInfoDesc" /></p>
<asp:TextBox ID="txtInfoDescription" runat="server" TextMode="MultiLine" Rows="3" MaxLength="500" />
</div>
<div class="centerMeVertically">
<div><asp:Button ID="btnNextInfo" runat="server" Text="Next" /></div>
</div>
<div class="textboxArea">
<p><asp:Label runat="server" ID="lblInfoData" /></p>
<asp:TextBox ID="txtInfoData" runat="server" TextMode="MultiLine" Rows="3" MaxLength="500" />
</div>
</div>
</div>
How are you ‘hiding’ textboxArea? Right now, textboxArea is fully contained within container, so overflow: auto should contain it. My guess is you are hiding textboxarea via visibility: hidden, which will make it not appear, but it’ll still take up space.
Instead use display: none, or, often preferred, position it off the screen via absolute positioning until you need it.