Whenever I add a dropdown menu, my CSS layout gets all messed up. Can someone please explain why this happens and how to fix it?
Below is the code snippet:
<asp:Label ID="projnamelbl" runat="server" CssClass="editlabels" Text="Project Name"></asp:Label>
<asp:TextBox ID="projnametxt" runat="server"></asp:TextBox><br />
<asp:Label ID="paymentlbl" runat="server" CssClass="editlabels" Text="Payment Type:"></asp:Label>
<asp:DropDownList ID="paymentype" runat="server">
<asp:ListItem Text="Cash" Value="cash"></asp:ListItem>
<asp:ListItem Text="Intallments" Value="installments"></asp:ListItem>
</asp:DropDownList><br />
<asp:Label ID="projsumlbl" CssClass="editlabels" runat="server" Text="Project Sum:"></asp:Label>
<asp:TextBox ID="projsumtxt" runat="server"></asp:TextBox><br />
CSS Style:
.editlabels {
float:left;
width:150px;
margin-right:0.2em;
padding-top:0.4em;
padding-left:20px;
text-align:left;
font-weight:bold;
}
For some strange reason, anything that comes after the dropdown menu seems to shift to the right.