Implement form form layout with CSS _css/html

Source: Internet
Author: User

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

In the table layout design form, is generally used 2 TD to layout, if not table, with CSS How to do it? Look at the following code


<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" > Name:</label>
<input type= "text" Id=user name= "user" value= ""/><br/>

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

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

<input type= "Submit" id= "Sbutton" value= "OK"/><br/>

</form>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.