Align textbox at the center

I have this textbox

<form action="/index.php" method="post">
    <input style="width: 450px;" name="url" type="text" /> 
    <input type="submit" value="Submit" />
</form>

I want to align it at the center. How can I do this?

Answers


Put the form inside a div. Style the div to align its child to center as:

<div style="text-align:center" >
   <form action="/index.php" method="post">
   <input style="width: 450px;" name="url" type="text" /> <input type="submit"      value="Submit" /></form>
</div>

Hope it helps.


Need Your Help

Restrict user-defined T-SQL query to SELECT type only

c# sql sql-server

I am working on an app that is providing a way for an user to define a SQL query and run it against the database. The only purpose of the query is to create a dataset which will be used to build a ...

How to make %{HTTP_HOST} always return non-www

apache .htaccess mod-rewrite

I have this redirect code and I want it to always return %{HTTP_HOST} as non-www no matter what sub-domain was used.