|
-
Jan 28th, 2010, 09:44 AM
#1
Thread Starter
Addicted Member
[RESOLVED] simple form positioning buttons CSS
This is an easy one but I don't know HTML very well. I haven't found the best way to position the submit and reset buttons in my form. I would like to center them to the form and put a little space between the buttons. I've been trying to do it from an embedded style sheet but a little unsure of how to use it to control position. Can someone point me in the right direction.
<html>
<head>
<style type = "text/css">
h2, h3 {color: purple}
body {background-color: lime}
#buttons {text-align = center}
#buttons.reset {left-margin = 40}
</style>
<title>Assignment One</title>
</head>
<body>
<table border = "0">
<tr>
<td>First Name:</td>
<td><input type="text" name="fname" size="10" maxlength="10" /> </td>
</tr>
<tr>
<td>Last Name:</td>
<td><input type="text" name="lname" size="20" maxlength="10" /> </td>
</tr>
<tr>
<td>Address:</td>
<td><input type="text" name="address" size="50" maxlength="50" /> </td>
</tr>
<tr>
<td>City: </td>
<td><input type="text" name="city" size="30" maxlength="30" /> </td>
</tr>
<tr>
<td>Zip: </td>
<td><input type="text" name="zip" size="6" maxlength="6" /> </td>
</tr>
<tr>
<td>Phone Number: </td>
<td><input type="text" name="phone" size="12" maxlength="12" /> </td>
</tr>
<tr>
<div id="buttons">
<td>
<input type="submit" name="submit" value="Submit Order"> <input type="reset" name="reset"></td>
</div>
</tr>
</table>
</form>
</body>
</html>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|