HTML(6)

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章