這裏只內1背景圖片的div是我有問題:IE顯示DIV
我試圖使佈局作爲圖片:
我當然更喜歡一個div版本,但是我的支持迄今爲止都是徒勞的。 我想出了一個表和div的組合,使其在Firefox中工作,但在IE8(可能還有其他IE版本)中,它不顯示背景圖像2和4.
有關如何製作在IE中工作? PS:沒有時間等待CSS3,我已經嘗試了怪癖模式,背景顯示,但許多其他問題沉浸其中。我寧願保持'過渡'模式。
HTML:
<table id="middletable" class="bg">
<tr><td class="left" width="*">
<table class="bg">
<tr><td id="leftimg"> </td></tr>
</table>
</td>
<td width="84">
<div class="middle">
CONTENT
</div>
</td>
<td class="right" width="*">
<table class="bg">
<tr><td id="rightimg"> </td></tr>
</table>
</td></tr>
</table>
CSS:如果我理解正確的,你想要的正文和附近的兩個圖像
table.bg {
width: 100%;
height: 100%;
border-collapse:collapse;
}
#middletable {
background: #fff;
}
#middletable td.left {
background: url('http://www.budowastrony.pl/fantom/images/site/middle-bg-left-rx.jpg') repeat-x top #ff0000;
text-align: right;
vertical-align: top;
}
#middletable td.right {
background: url('http://www.budowastrony.pl/fantom/images/site/middle-bg-right-rx.jpg') repeat-x top #ff0;
text-align: left;
vertical-align: top;
}
#leftimg {
height: 100%; width: 100%;
background: url('http://www.budowastrony.pl/fantom/images/site/bg-middle-left-nr.jpg') no-repeat top right #ccc;
}
#rightimg {
height: 100%; width: 100%;
background: url('http://www.budowastrony.pl/fantom/images/site/bg-middle-right-nr.jpg') no-repeat top left #000;
}
檢查此jsfiddle:http://jsfiddle.net/CndUR/(圖像替換爲顏色 - 如果您可以絕對鏈接圖像,這將幫助其他用戶幫助您找到解決方案)。這是佈局顯示的方式嗎?如果此鏈接表示/重新創建您的問題。發佈在你的問題。然後其他SO用戶將能夠更快地幫助你=) – Dan
嗨Dan,感謝您的幫助,我已經用真實圖像更新了圖像,與您推薦的jsfiddle相同:http://jsfiddle.net/CndUR/5 /問題仍然存在於IE中。任何幫助將不勝感激謝謝 – Czakalli
您是否嘗試過下面提供的任何解決方案? – Dan