Page 1 of 1

how can i center the html form

Posted: Fri Feb 26, 2010 8:45 am
by vin_akleh
how can center this html form??? it doesn't matter if i center the whole page, that will be ok

Code: Select all

<HTML DIR=RTL>   <HEAD>      <title>صفحة تسجيل الدخول المسؤول</title>      <META charset=windows-1256><link rel="stylesheet" type="text/css" href="style.css" media="screen" /></head>  </head>   <body>  <span class="adminlogin">    <form method="post" action="">      <label> الأسم:<br/>        <input type="text" name="name" maxlength="5"/>     </label>       <br> <br>      <label> كلمة السر: <br/><input type="password" name="pass" />      </label>     <br> <br>     <input type="submit" value="تسجيل الدخول" name="submit"/> &nbsp; &nbsp &nbsp;      </form></span>  </body>   </html> 
i have tried to use "span class" in css ".adminlogin{width: 80%;margin-left:auto;margin-right:auto;}" that didnt work!! any ideas

Re: how can i center the html form

Posted: Fri Feb 26, 2010 9:46 am
by pickle
Try making it a div instead?

Re: how can i center the html form

Posted: Fri Feb 26, 2010 9:55 am
by vin_akleh
thanks