我試圖讓3個靈活的圖像在水平方向排隊,並保持其具有靈活的背景及其靈活的div容器的範圍內,3靈活父DIV中靈活的div
容器的背景和3張照片應該全部保持彼此的位置關係,以便它們始終位於彼此之上。它們應該隨瀏覽器窗口的大小而變得越來越小,但寬度不超過800像素。
我遇到的問題是左側的背景和頁腳大滿貫,按鈕divs正確。
HTML:
<div id="container">
<div id="footer">
<div id="left">
<input type="image" name="MyLeftButton" id="MyLeftButton" class="imgstretch" src="Images/MyLeftImage.png" style="border-width:0px;">
</div>
<div id="middle">
<input type="image" name="MyMiddleButton" id="MyMiddleButton" class="imgstretch" src="Images/MyMiddleImage.png" style="border-width:0px;">
</div>
<div id="right">
<input type="image" name="MyRightButton" id="MyRightButton" class="imgstretch" src="Images/MyRightImage.png" style="border-width:0px;">
</div>
</div>
</div>
CSS:
#container {
margin: 0em auto 0em auto;
width: 100%;
max-width: 800px;
}
#footer {
width: 100%;
max-width: 800px;
max-height: 80px;
float: left;
text-align: center;
position: fixed;
bottom: 0em;
background-color: #009FC1;
}
#left {
float: left;
max-height: 80px;
max-width: 294px;
width: 36%;
margin-left: 20px;
display: inline-block;
background-color: #CCCCCC;
}
#middle {
max-height: 80px;
width: 25%;
float: left;
max-width: 202px;
display: inline-block;
background-color: #889FC1;
}
#right {
max-height: 80px;
max-width: 294px;
width: 36%;
float: left;
display: inline-block;
background-color: #9999DD;
}
.imgstretch {
width:100%;
}
CSS問題需要* generated * HTML,ASP模板代碼對我們來說沒用。 – cimmanon
對此我很抱歉。我澄清了我的代碼幷包含JSFIDDLE。 – fred1234