How to float an element
First, give it an identity“amazing”
Now give it a width#amazing {
width: 200px;
}
Now let’s add the float property. The float property can be set to either left or right. Let’s stick with right:
#amazing {
width: 200px;
float: right;
}
<form action="http://wickedlysmart.com/hfhtmlcss/contest.php"method="POST">
<p>Just type in your name (and click Submit) to enter the contest: <br>
First name: <input type="text" name="firstname" value=""> <br>
Last name: <input type="text" name="lastname" value=""> <br>
<input type="submit">
</p>
</form>
contest.php:server script that will process the form data