页面导航: 首页网络编程CSS/HTML → 正文内容

用CSS实现表单form布局

发布:dxy 字体:[增加 减小] 类型:转载

出处:http://blog.donews.com/dodo/archive/2005/06/18/434979.aspx

在TABLE布局中设计Form,一般都是用2个td来布局,如果不用table,用CSS怎么做呢?看看下面的代码


<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>

 

百度中搜索更多的关于用CSS实现表单form布局内容,或者用Google搜索相关更多
浏览次数:载入中... 打印本文关闭本文文章来源

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行