purencool Posted August 6, 2009 Share Posted August 6, 2009 I am having trouble get the labels and the text boxes to line up the display:block will not let the textboxes stay on the same line. Even if I try to use display:inline using class inside the input box. Can it be done using css? body{ font-family:"Arial","Georgia,Serif"; font-size:16px } #wrapper{ margin-left: auto; margin-right: auto; width: 600px; } /* adding css to form*/ #form67{ display:block; width:200px; text-align:right; } fieldset { border: 1px solid ; width: 70%; padding: 20px; margin-left: auto; margin-right: auto; } fieldset legend { padding: 6px; font-weight: bold; } the form <form id="anniversary" name="anniversary" method="get" action="<?php echo $PHP_SELF;?>"> <fieldset> <legend>Add A New User</legend> <label id="form67" for="firstName">First Name:</label> <input type="text" name="firstName" id="firstName" size="30" maxlength="30" /> <label id="form67" for="lastName">Last Name:</label> <input type="text" name="lastName" id="lastName" size="30" maxlength="30" /> <label id="form67" for="address">Address:</label> <input type="text" name="address" id="address" size="30" maxlength="30" /> <p><input type="submit" name="button" id="button" value="Submit" /></p> </fieldset> </form> Quote Link to comment Share on other sites More sharing options...
haku Posted August 6, 2009 Share Posted August 6, 2009 float them left. Quote Link to comment Share on other sites More sharing options...
purencool Posted August 6, 2009 Author Share Posted August 6, 2009 Thanks it works great I should of know!!!!!!!!!!!!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.