How do I put a <label> over a textbox control in ASP.Net using CSS?

Viewed 2949

I'm trying to create one row with some text boxes with label's over them like this:

enter image description here

How do I align the labels up with the text boxes?

        <label>Student ID</label>
        <asp:TextBox ID="txtStudentID" runat="server"></asp:TextBox>
        <label>Student Last Name</label>
        <asp:TextBox ID="txtStuLastName" runat="server"></asp:TextBox>
        <label>Student First Name</label>
        <asp:TextBox ID="txtStuFirstName" runat="server"></asp:TextBox>

Here's my current CSS.

.boxround label {
    display: block;        
    float: left;
}

This is what I current get:

enter image description here

Thank you.

2 Answers
Related