Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can either use div's setting the width explicitly and float: left or you can do it with a table as suggested. Randomly putting items on a page without containers and expecting to get them aligned is a feeble and time wasting attempt.</p> <p>Here is a possibility (untested and adjust div sizes for what you need):</p> <pre><code>&lt;div&gt; &lt;div style="margin-bottom: 20px;"&gt; &lt;asp:Label ID="CreditCardHolderLabel" runat="server" AssociatedControlID="CreditCardHolder" Text="Cardholder's Name" /&gt; &lt;br /&gt; &lt;asp:TextBox ID="CreditCardHolder" runat="server" CssClass="TextBox" MaxLength="30" Width="300" style ="left:-100px" &gt;&lt;/asp:TextBox&gt; &lt;/div&gt; &lt;div style="clear: both; width: 200px;"&gt; &lt;asp:Label ID="CreditCardTypeLabel" runat="server" AssociatedControlID="CreditCardType" Text="Credit Card Type" /&gt; &lt;br /&gt; &lt;asp:DropDownList runat="server" ID="CreditCardType" Width="105"&gt; &lt;asp:ListItem Text="VISA" Value="VISA" /&gt; &lt;asp:ListItem Text="MasterCard" Value="MasterCard" /&gt; &lt;asp:ListItem Text="Discover" Value="Discover" /&gt; &lt;asp:ListItem Text="Amex" Value="Amex" /&gt; &lt;/asp:DropDownList&gt; &lt;/div&gt; &lt;div style="float: left; width: 200px;"&gt; &lt;asp:Label ID="CreditCardNumberLabel" runat="server" AssociatedControlID="CreditCardNumber" Text="Credit Card Number" /&gt; &lt;br /&gt; &lt;asp:TextBox ID="CreditCardNumber" runat="server" CssClass="TextBox" MaxLength="16" Width="120"&gt;&lt;/asp:TextBox&gt; &lt;/div&gt; &lt;div style="float: left; width: 200px;"&gt; &lt;asp:Label ID="ExpirationLabel" runat="server" AssociatedControlID="ExpirationMonth" Text="Expiration Date" /&gt; &lt;br /&gt; &lt;asp:DropDownList runat="server" ID="ExpirationMonth" Width="40"&gt; &lt;asp:ListItem Text="01" Value="01" /&gt; &lt;asp:ListItem Text="02" Value="02" /&gt; &lt;/asp:DropDownList&gt; &lt;asp:DropDownList runat="server" ID="ExpirationYear" Width="60"&gt; &lt;asp:ListItem Text="2012" Value="2012" /&gt; &lt;asp:ListItem Text="2013" Value="2013" /&gt; &lt;/asp:DropDownList&gt; &lt;/div&gt; &lt;div style="float: left; width: 200px;"&gt; &lt;asp:Label ID="CVVLabel" runat="server" AssociatedControlID="CVV" Text="CVV Code" /&gt; &lt;br /&gt; &lt;asp:TextBox ID="CVV" runat="server" CssClass="TextBox" MaxLength="4" Width="50"&gt;&lt;/asp:TextBox&gt; &lt;/div&gt; </code></pre> <p></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.
    1. VO
      singulars
      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