Standard production page: Using CSS DL, DD, DT to do the form

Source: Internet
Author: User
css| Standard | Web site yesterday made a form, still use table layout, because the individual feel table layout table is good (the pursuit of Div refactoring, not equal to completely discard table).

Get up this morning and think about the layout of the form in a different way. Then the selection of DL, DD, DT, as follows:

XHTML section:
<dl>
<dt> Company Name:</dt>
<dd><input name= "text" type= "text" value= "June Bao Industrial Co., Ltd. Guangzhou" size= "/> <span" "Red" >*</span> </dd>
<dt> Industrial Category:</dt>
<dd><select name= "Select" ><option> Computer and Consumer electronics </option></select>
<select name= "Select" ><option> air conditioner </option></select> <span class= "Red" >*</span ></dd>
<dt> Company Introduction:</dt>
<dd><textarea name= "textarea" cols= "rows=" "9" > Guangzhou June Bao Industrial Co., Ltd. was founded in 1990, is a scientific research, manufacturing, sales and service in one, with research and development Center, Mold Design and manufacturing center, electronic and circuit control design and manufacturing center, injection molding processing and product production base of large-scale economic entities. June Bao Company's production base covers an area of about 30000 square meters, has excellent equipment, strong production capacity. Companies in accordance with the norms of modern enterprise organization and management, adhere to integrity, innovation, diligence, enterprising spirit of enterprise, and constantly grow and develop.
June Bao Company talent, the existing staff of 326 people, with research and development ... </textarea> <span class= "Red" >*</span>
</dd>
</dl>
CSS section:
dl{padding-left:14px;}
dt{float:left;font-weight:bold;padding:12px 0 4px;}
dd{text-align:left;height:auto;padding:8px 0;}
input,select{Vertical-align:middle;color: #333333; background: #ffffff; font:12px Arial, Helvetica, Sans-serif;}
Textarea{color: #333333; background: #ffffff; font:12px Arial, Helvetica, Sans-serif;line-height:150%;overflow:auto}
Description:For DL, DT, DD settings are recommended do not use height and row height (line-height), in the FF will produce dislocation, because IE and FF are adaptive cause, we recommend the use of DT, DD padding properties to locate!

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.