Adaptive process on the left side of CSS fixed width (compatible with all browsers)

Source: Internet
Author: User

Adaptive process on the left side of CSS fixed width (compatible with all browsers)

CSS style

 

body,ul,li {  margin:0;  padding:0;}ul,li {  list-style:none;}.form-table {  width: 600px;  height: 330px;  margin:10px auto;  overflow: hidden;  padding: 0;}.form-table .list {  width: 100%;  height: auto;  overflow: hidden;}.form-table .list .item {  width: 100%;  height: auto;  margin-top: 10px;  font-size: 12px;  line-height: 40px;  overflow: hidden;}.form-table .list .item .name {  float: left;  width: 67px;}.form-table .list .item .info {  width: 100%;  height: auto;  margin-left: 67px;}.form-table .list .item .textarea {  position: relative;  width: auto;}.form-table .list .item .input {  width: 360px;  height: 40px;  line-height: 40px;  text-indent: 10px;  border: 1px solid #e5e5e5;  border-radius: 3px;}.form-table .list .item textarea {  width: 100%;  height: 100px;  border: 1px solid #e5e5e5;  border-radius: 3px;  box-sizing: border-box;}

HTML code

 

 

      
Enter the form
  • Application name: alimail
  • Personal Signature: 
  • Personal description: 
 

The div. name on the Left needs to be floating, and the div.info on the right does not set floating (width is not defined as pixel or percentage, either not defined or auto ,),
Set the value of margin-left to be the same as the width value of div. name on the left;
Box-sizing: border-box; this indicates that the element size includes a border. ie8 + is supported;

If the width of the div. form-table is changed, the div.info element on the right and the size of the child element are also changed; adaptive;

 

:

 

 

 

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.