son Posted June 8, 2009 Share Posted June 8, 2009 I have a form the update colours in database. The relevant extract is: <h2>Update and delete colours</h2><form action="colours.php" method="post" style="float:left; margin-right:5px;"><input type="hidden" name="id" value="22" /> <label for="colour">brown</label> <input type="text" name="colour" id="colour" size="20" maxlength="10" > <input type="hidden" name="submitted" value="TRUE" /><input type="hidden" name="mode" value="upd" /><input type="submit" name="submit" value="Update" /></form><form action="colours.php" method="post"><input type="hidden" name="id" value="22" /><input type="hidden" name="colour" id="colour" value="brown"> <input type="hidden" name="submitted" value="TRUE" /><input type="hidden" name="mode" value="del" /><input type="submit" name="submit" value="Delete" /></form><br clear="left" /> Label, input field, update and delete button sitting nicely next to each other, but if the label fields have different widths it all does not look so neat. Cannot assign a width to label tag and this also would not work with a span. What else can you do?Son Link to comment Share on other sites More sharing options...
cedric Posted June 8, 2009 Share Posted June 8, 2009 i'm not sure what you are asking?Do you want various <label> tags and just one time the two buttons?Or every label has two buttons next to it and the buttons have to be under eachother? Link to comment Share on other sites More sharing options...
son Posted June 15, 2009 Author Share Posted June 15, 2009 i'm not sure what you are asking?Do you want various <label> tags and just one time the two buttons?Or every label has two buttons next to it and the buttons have to be under eachother?I want mainly to have everything for one item in one line (so you can update and delete in same line as such). Saves space...Son Link to comment Share on other sites More sharing options...
Synook Posted June 17, 2009 Share Posted June 17, 2009 Make the labels and inputs display:block and float:left - that way they will still be next to each other and can also have defined widths. Link to comment Share on other sites More sharing options...
son Posted June 28, 2009 Author Share Posted June 28, 2009 Make the labels and inputs display:block and float:left - that way they will still be next to each other and can also have defined widths.Works well. Many thanks...Son Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.