我有以下代碼:爲什麼離開DIV不佔地100%的高度
<div style="padding-top: 30px; text-align: center; position: relative;">
<div id="dvQuotes" style="min-height: 100px; border: 1px solid blue;">
<div id="dvOrangeLeftQuote" style="float: left; width: 18%; height: 100%; padding-right: 2%; background: #DDD; text-align: right;">
<img src="theImages/quoteOrangeLeft.png" />
</div>
<div id="dvOrangeQuote" style="text-align: left; width: 80%; font-weight: bold; color: #000000; font-size: medium; margin-top: 40px; margin-bottom: 40px; background: #6c6c6c;">
I have been blessed to be assisted by this group. Everyone in all positiong have treated my like family. My doctors are more than excellent, and I can't stop telling everyone about them.
</div>
<div id="dvOrangeRightQuote" style="padding-left: 2%; float: right; width: 18%; position: absolute; bottom: 0; right: 0; background: #7e75f2; text-align: left;">
<img src="theImages/quoteOrangeRight.png" />
</div>
</div>
</div>
其中顯示:
這是我所期待的事:
我該如何實現它?
UPDATE:當藍色的邊框被刪除,對齊搞砸:
側面說明,儘量避免內嵌樣式。 – j08691
@ j08691這是一個例子,一切都在樣式表:) – Si8
你有沒有試過對所有div使用相同的固定高度? – EduardoFernandes