The left and right structure of the HTML layout, with the parent element adaptive

Source: Internet
Author: User

HTML layout of the structure, left fixed to the right with the parent element adaptive, compatible with ie6+, Firefox, Chrome, Opera, Safari, here is a form to write a demo, in fact, in the main layout is also possible, such as the background some management system left menu, Content on the right.
? 1. [File] layout_float_bfc.html
<!doctype html>
<meta charset= "UTF-8" >
<title>Document</title>
<style>
UL {
List-style-type:none;
padding:0;
margin:0;
}
. Item {
Overflow:hidden;
Zoom:1;
font-size:12px;
margin-bottom:20px;
}
. Item. item-title {
Float:left;
width:85px;
font-size:14px;
font-weight:400;
Text-align:right;
}
. Item. Item-con {
Overflow:hidden;
Zoom:1;
}
Em,i {
Font-style:normal;
}
p {
Margin:0.3em 0;
}
. Star {
Color: #F00;
margin-right:5px;
}
. tips-text {
Color: #ccc;
}
. Input {
border:1px solid #ccc;
PADDING:2PX 5px;
margin:0;
}
</style>
<body>
<ul>
<li class= "Item" >
<div class= "Item-title" >
<em class= "star" >*</em><label for= "> E-mail address </label><i>:</i>
</div>http://www.huiyi8.com/qzone/?
<div class= "Item-con" &GT;QQ background
<input class= "input" placeholder= "recommended to register with mobile phone number" type= "text"/>
<p class= "Tips-text" >6~18 characters, can use letters, numbers, underscores, start with a letter </p>
</div>
</li>
<li class= "Item" >
<div class= "Item-title" >
<em class= "star" >*</em><label for= "" > Password </label><i>:</i>
</div>
<div class= "Item-con" >
<input class= "Input" type= "text"/>
<p class= "Tips-text" >6~16 characters, case-sensitive </p>
</div>
</li>
<li class= "Item" >
<div class= "Item-title" >
<em class= "star" >*</em><label for= "" > Confirm password </label><i>:</i>
</div>
<div class= "Item-con" >
<input class= "Input" type= "text"/>
<p class= "Tips-text" > Please fill in the password again </p>
</div>
</li>
</ul>
</body>
?

The left and right structure of the HTML layout, with the parent element adaptive

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.