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