Reputation: 10400
I want to position a registration from at the center of a page.
please tell me how should i do that
Upvotes: 8
Views: 55637
Reputation: 31
Just use:
<div style="margin:0 auto" align=center>
<input button>
</div>
Upvotes: 3
Reputation: 11
I created a .CSS file with the following:
form {width: 40%;
margin-right: 30%;
margin-left: 30%;
background-color: green}
div.mainform {width:100%;
border:1px solid #000}
Then in the HTML document I used.
<DIV ID="MAINFORM">
<FORM>
Other HTML Markup
</FORM>
</DIV>
Upvotes: 1
Reputation: 18487
Encapsulate it in a div with the following CSS attributes:
<div style="width:400px; margin-right:auto; margin-left:auto; border:1px solid #000;">
<form action="helloWorld">
<Some markup>
</form>
</div>
Upvotes: 11