...

View Full Version : how to display a textbox below a label



Spawn10
12-22-2010, 05:53 PM
Hi all, am a newbie to css, so please be patient. All am trying to do is simply display a textbox below it's descriptive label. How can i get this done in css?
Right now I have the html for my controls as below


<div class="label">
<asp:Label ID="lblNumber" runat="server" CssClass="lblStyle01">Number:</asp:Label>
</div>
<div class="value">
<asp:TextBox ID="TextBox8" runat="server" CssClass="txtStatic"></asp:TextBox>
</div>


and my current stlyes as



.lblStyle01
{ font-size: 12px;
text-align:right;
}
.txtStatic
{ font-size: 12px;
background-color: #f4f4f4;
border: none;
}


Thanks

jmace
12-22-2010, 07:04 PM
If I understand the question right, you want the first div to be over the second?

Try:


.label, .value{
position:static;
float:none;
}


By default, div's always appear on there own line unless you float them or use a position: absolute, etc. So you must have some code somewhere that changes it. This would set it back to the default.

Don't know if this is what your after, but I hope it helps.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum