我試着去建立一個佈局...第3個容器正在顯示預期.. 我想沿着container1,container2的一側顯示的容器4,容器佈局構建 - div元素不aligining
RequirementL
容器4應顯示旁邊(Container1 + 2 + 3)
撥弄: http://jsfiddle.net/prem1980/39rJd/1/
HTML
<div id="main-container">
<div id="container1">
container-1
</div>
<div id="container2">
</div>
<div id="container3">
</div>
<div id="container4">
container 4
</div>
</div>
CSS
html, body{
height: 100%;
width:100%;
/*background-color:#AFEEEE;*/
background-color:grey;
}
#main-container {
height:100%;
width:100%;
/*margin:10px 10px 10px 10px; */
}
#container1 {
height:60%;
width:30%;
margin:10px 10px;
background-color:green;
float:left;
clear:both;
}
#container2 {
height:20%;
width:30%;
margin:10px 10px;
background-color:yellow;
float:left;
clear:both;
}
#container3 {
height:20%;
width:30%;
margin:10px 10px;
background-color:red;
float:left;
clear:both;
}
#container4 {
height:100%;
width:30%;
margin:10px 10px;
background-color:orange;
float:left;
}
我需要改寫時,我的意思是側向..ie alongside..its;容器4應顯示在(容器1 + 2 + 3)旁邊 – user1050619