我只是不能讓那些左邊的固定div響應。 3個div:| fixed | |中| |固定|這3個div是在一個div中。 如果即將進入全尺寸窗口,他們正在完美地工作,但是當我縮小窗口的大小時,它將所有東西都擰緊。 我不知道如何解決 - 我的中心div工作完美,響應和中心。 但左側和右側固定不會有反應。 我想解決方案是連接到固定div的響應寬度..任何想法? 我增加JSFIDDLE例如用於您的方便:CSS -align 3響應式分區 - 左側位置固定,中心正常
這是如下結構:
<div>
<div **fixed** left> <img> </div>
<div **normal** center> 2 divs for left and right inside the center div </div>
<div **fixed** right> </div>
</div>
REAL HTML:
<div id="div_header">
<div class="cloumn right" id="div_right"><img src="http://placehold.it/250x600"></div>
<div class="cloumn center" id="div_center">
<div id="inside_center">
<div class="left_side" id="left_inside_center">
</div>
<div class="right_side" id="right_inside_center">
<h1> headline </h1>
<img src="http://img-9gag-lol.9cache.com/photo/a7KwPAr_460s.jpg">
</div>
</div>
</div>
<div class="cloumn left" id="div_left"><img src="http://placehold.it/250x600"></div>
</div>
</div>
REAL CSS:
body {
margin-top: 0 !important;
direction: rtl;
}
#right_inside_center img {
width: 97%;
margin-top: 7px;
}
#left_inside_center {
float:left;
width:inherit;
}
#right_inside_center {
float:right;
width:65%;
}
#inside_center {
height: auto;
overflow: hidden;
}
#div_header {
text-align: center;
display: table;
width: 100%;
table-layout: fixed;
}
.cloumn {
display: table-cell;
}
.center {
background:green;
height: 1500px;
width: 60%;
}
.left {
position: fixed;
width: 18%;
}
.right {
position: fixed;
width: 18%;
}
你可以讓它更清楚你想要做什麼?這裏顯然有很多的努力,但我無法弄清楚你想要的結果是什麼。 – ArtOfCode 2014-10-18 16:10:09
我認爲你正在尋找這個http://jsfiddle.net/victor_007/qwxoj8k2/2/ – 2014-10-18 16:25:43
@VitorinoFernandes OMG你是我的上帝!謝謝,你可以上傳答案,讓我可以upvote? – 2014-10-18 17:32:31