萬盛學電腦網

 萬盛學電腦網 >> 網頁制作 >> DivCSS教程 >> 用CSS實現表單form布局

用CSS實現表單form布局

 <style type="text/css">

label{
float: left;
width: 80px;
}
form{margin:0px}
input{
width: 180px;
border:1px solid #808080
}

textarea{
width: 250px;
height: 150px;
}

#sbutton{
margin-left: 80px;
margin-top: 5px;
width:80px;
}

br{
clear: left;
}

</style>

<form action="" method="post">

<label for="user">姓名:</label>
<input type="text" id=user name="user" value="" /><br />

<label for="email">郵件:</label>
<input type="text" id=email name="email" value="" /><br />

<label for="comment">備注:</label>
<textarea id=comment name="comment">
</textarea>
<br />

<input type="submit" id="sbutton" value="確定" /><br />

</form>

copyright © 萬盛學電腦網 all rights reserved