I'm trying to align a <form>
to be centered in a <div>
. This is what I've done till now:
<div style="height:auto; margin: 0 auto; align:center;">
<form style="width:50%; margin:0 auto;" onSubmit="return false;">
</form>
</div>
This centers the form, but is there any other way to do this on a more professional way?
I also have a button in this form which is aligned left by default. I tried to change the alignment but it failed.
Who can help me?