我有幾個問題,我的HTML和CSS,這是我的HTML:CSS問題,div的相互
<div class="picCommnet" style="background-color:#FFF8AD; padding: 5px 0 5px 0; border: 2px dotted #d2d9e7;">
<div style="width:20%; float:right;background-color: yellow;">
<img src="">
</div>
<div style="width:75%; float:right; padding: 5px 0 5px 0; border: 2px dotted #d2d9e7;">
<div style="width:100%; background-color: green;">
מתן בדיקה
</div>
<div style="width:100%; background-color: paleturquoise;">
check comment
</div>
<div style="width:100%; background-color: red;">
</div>
</div>
<div style="width:5%; float:right;">
<img src="">
</div>
</div>
所有的CSS是在標籤的樣式屬性,這是我怎麼想是: http://s4.postimg.org/4dl41pd9p/how_i_want.png
這是我所得到的,而不是: http://s4.postimg.org/ggqfp9obx/what_i_get.png
正如你所看到的,3周的div是假設是一個低於其他都超過對方,和的div內的文本是某種outsid電子和它的高度仍然是0.
我該如何解決它?
編輯: 這是我嘗試添加代替的div表:
<table>
<tbody>
<tr>
<td rowspan='3'>Remove Comment Pic</td>
</tr>
<tr>
<td>Comment UserName</td>
<td>Comment Text</td>
<td>Likes</td>
</tr>
<tr>
<td rowspan='3'>User Profile Pic</td>
</tr>
</tbody>
</table>
發佈現場演示或jsfiddle以獲得更快更準確的響應。 –
這就是我得到的表格:http://s27.postimg.org/5uvuj7x9v/table_i_get.png – Kadosh