0

ok, so I have this html form

<html>
  <head> <title> SUBMIT FORM </title> 
  <link type="text/css" rel="stylesheet" href="prva_strana.css" />
  </head>
     <body>

	 <form action="druga_strana.php" method="post">
	   
<div> <label for="Fname"> First Name: </label> <input type="text" name="Fname"> </div>
<div> <label for="Lname"> Last Name: </label> <input type="text" name="Lname"> </div>
<div> <label for="Uname"> User Name: </label> <input type="text" name="Uname"> </div>
<div> <label for="Email"> Email: </label> <input type="text" name="Email"> </div>
<div> <label for="password"> Password: </label> <input type="password" name="pass"> </div>
<div> <label for="Cpass"> Confirm Password: </label> <input type="password" name="Cpass"> </div>

<div class="actions"> <input type="submit" name="submit" value="Submit">
	<input type="reset" name="reset" value="Reset all"> </div>

	 </form>

</body>
</html>

and I have this CSS

body {
	font: small bold Verdana, Arial, Helvetica, Geneva, sans-serif;
}
form div {
	margin 0 0 0.25ex 0;
	clear: left;
}
label {
	width: 6em;
	display: block;
	float: left;
	font-weight: bold;
	padding-right: 1.5em;
	text-align: center;
}
form div.actions {
	margin-left: 6em;
	padding-left: 1.5em;
}

what I need is to CENTER WHOLE FORM in the middle of a page, if I wrap everything in ONE div and put align="center" it will only center the INPUT fields, but I need everything ( first name, last name, pass ... ) to be centered with the input fieds..

help anyone?

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by phoenix_sdl
0

tried it.. Got the same result, First name, Last name... etc on the left, and input field on center :(

I know I can do this form with tables, but I would like to avoid tables by any means :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.