Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to position an input form at the center of a page?

Tags:

css

I want to position a registration from at the center of a page.

please tell me how should i do that

like image 386
Anand Avatar asked Oct 17 '09 14:10

Anand


People also ask

How do you position a form in the center of the page?

Use the CSS text-align Property to Center a Form in HTML We can use the property as an inline style of the form tag to set the alignment of the form. The text-align property takes the values like left , right , center , justify , etc. We can set the value to center to center the form.

How do I change the form in the middle of my screen?

To center your form in the application screen, open the form in design view. View the Form Properties. Set the "Auto Center" property to "Yes".


1 Answers

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>
like image 189
Wayne Hartman Avatar answered Oct 13 '22 18:10

Wayne Hartman