我有一個兩列的表。左列有一些內容和一個小部件div,它是唯一的浮動元素。這個div在頁面加載時一直移動到頁面的底部,並帶有表格的右列。有時當我徘徊時,它會退後,似乎是完全隨機的。Div在IE中移動
似乎IE瀏覽器一個噓錯誤,但不完全。我試過position: relative;
但它不起作用。有任何想法嗎?
這裏的HTML:
<table class="formTable">
<tr>
<td class="content_main">
<h1>header</h1>
<table>
<tr>
<td>Content here</td>
<td>Content here</td>
</tr>
</table>
<div style="float: left; clear: none; display: block; color: rgb(68, 68, 68); font-weight: normal; font-family: "Trebuchet MS","Verdana",sans-serif; font-size: 14px; line-height: 18px; text-decoration: none; text-align: left; margin: 0px; padding: 10px; height: auto; width: auto; background-image: none; background-color: white; border: 10px solid rgb(204, 204, 204); overflow: auto;" id="widget">
Content
</div>
</td>
<td class="content_right">
<ul>
<li>List</li>
<li>List</li>
</ul>
</td>
</tr>
</table>
而這裏的表的CSS:
.content_right {
padding-left: 20px;
padding-top: 15px;
width: 393px;
}
.content_main {
padding-top: 15px;
width: 500px;
}
嘗試使用CSS重置腳本,如[yui2重置](http://developer.yahoo.com/yui/reset/) – 2012-01-11 10:56:56
不能重現..你能改變[這個小提琴](http:// jsfiddle.net/8wytE/)重現你的體驗?內容中可能有東西嗎? – 2012-01-11 11:25:07
你用什麼docType作爲你的例子?無法重現。 – 8bitjunkie 2012-01-11 16:33:39