Hi,
I'm trying to learn how to line up fields of a form using CSS instead of tables. I'm having a hard time with a CheckBox control. Here's the code:
<html xmlns="http://www.w3.org/1999/xhtml" >
<label for="CheckBox1">CheckBox</label>
<asp:CheckBox ID="CheckBox1" runat="server" />
<br />
<label for="TextBox1">TextBox</label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<div>
</div>
</form>
Here's the CSS:
body
{
}
label
{
width:300px;
float:left;
}
I'm getting something that looks like this:
CheckBox []
[CheckBox1] TextBox [ ]
Why is [CheckBox1] on the next line?
Here's a pic:
Also, is there a better way to do this?