[ACCEPTED]-How to position an input form at the center of a page?-css
Accepted answer
Encapsulate it in a div with the following 1 CSS attributes:
<div style="width:400px; margin-right:auto; margin-left:auto; border:1px solid #000;">
<form action="helloWorld">
<Some markup>
</form>
</div>
Just use:
<div style="margin:0 auto" align=center>
<input button>
</div>
0
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 1 in the HTML document I used.
<DIV ID="MAINFORM">
<FORM>
Other HTML Markup
</FORM>
</DIV>
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.