html - Trying to align input field with labels -
i want align input fields shown below, keep using <label> in correct way.

the code below:
<form action="add.php" method="post" enctype="multipart/form-data"> <label for="refno">field1 name (long)</label> <input id="refno" type="text" name="refno" value="" /><br> <label for="name">field2 name</label> <input id="name" type="text" name="name" value="" /><br> <input type="submit" value=":: add ::" name="addbtn" /> </form> i thinking separate <label> tags in <div> , input fields in , floating manipulation make intended alignment, correct way?
how
form > label { min-width: 185px; display: inline-block; } <form action="add.php" method="post" enctype="multipart/form-data"> <label for="refno">field1 name (long)</label> <input id="refno" type="text" name="refno" value="" /><br> <label for="name">field2 name</label> <input id="name" type="text" name="name" value="" /><br> <input type="submit" value=":: add ::" name="addbtn" /> </form>
Comments
Post a Comment