samedi 2 juillet 2016

Stretch textbox to fill remaining space on asp form

I have a div with a label and a textbox and I simply want the textbox to stretch out to fill the remaining space on the page. I know that the 100% width doesn’t include any padding or margin values so I’ve added that to textbox and div. I’ve searched many similar topics, but my textbox always drops to a new line below the label. What am I missing? I'm placing my css inline just for testing purposes.

<div style="padding-right:10px;">
    <asp:Label ID="Label1" runat="server" Text="Label" style="float:left; width:150px; display:inline-block"></asp:Label>
    <asp:TextBox ID="TextBox1" runat="server" style="display:inline-block; width:100%; padding-right:0"></asp:TextBox>
</div>

Aucun commentaire:

Enregistrer un commentaire