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> Link to comment https://forums.phpfreaks.com/topic/169029-solved-forms-labels-and-css/ Share on other sites More sharing options...
haku Posted August 6, 2009 Share Posted August 6, 2009 float them left. Link to comment https://forums.phpfreaks.com/topic/169029-solved-forms-labels-and-css/#findComment-891799 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!!!!!!!!!!!!!! Link to comment https://forums.phpfreaks.com/topic/169029-solved-forms-labels-and-css/#findComment-891812 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.