這已經駕駛我瘋狂試圖解決爲什麼IE不遵守我的列寬?
代碼:http://pastebin.com/rqyw35jG所有的
首先,我渲染標準模式。 我在IE中有一個表格,寬度= 100%,並且表格中的所有列都有指定的寬度,最後一列除外。預期的行爲是IE瀏覽器調整最後一列的大小,以便延伸到頁面。這或多或少的作品。然而;
某些條件似乎打破了表寬度,並導致IE去和大小的表,但它喜歡。
- 表包含在所有列合併,
- 這種合併的行包含足夠多的文本以填充整個小區
- 足夠的文本輸入到其列有未指定的寬度細胞的一個排,導致文字換行。
當這三種情況發生時,所有列都稍微移動。文本仍然包裝並且通常不會注意到列的大小不正確,除非您測量它們,或者將頁面與沒有包裝文本的版本進行比較。
這甚至應該發生在標準模式?
代碼:
<%@ Page Language="VB" %>
<%@ Import Namespace="Microsoft.SharePoint.Client" %>
<%@ Import namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQLClient" %>
<script runat="server">
Protected Sub Page_Load(sender As Object, e As System.EventArgs)
End Sub
</script>
<%
%>
<!DOCTYPE html />
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<table style="width:100%;">
<tr>
<td style="width:500px;">egqwgw gqgqwgqg qwgqgqg qgwgqgqg qwgqgg</td>
<td style="width:500px;">gqgqwgqg gqwgqgqgq gqgqgqg qgg</td>
<td>If too much text is entered into this column, the column sizes will begin to change. wehwehweh hwehwh whhwhwh hwehwhwh</td>
</tr>
<tr>
<td>a gqwgqwg gqgqw </td><td>gqgqgqg gqgqg</td><td></td>
</tr>
<tr>
<td colspan="3">Columns only move if text on this line is filling out the whole width of the page. gqwgqwggqg qgqgqwgqg qgqwgqgqg gqgwqgqg gqgqgqgqg qgqgqgqg gqgggqg
qgwgqgqg gqgqgqwgwg qgqwgqgqgq gqgwgwgqg gqgwgq gqwgwgqgqwg qgwgqgqgqwg
qwgqwgqgqg qgwgqgqqg gqwgqwgqwgwqg gqgwgqgwg qwgqwgqgqgq qwgqgqgqg gwqgqgqg
qggqwgqg qggwqgqg
</td>
</tr>
</table>
</body>
</html>
代碼或它沒有發生!不,但我們真的可以看到代碼嗎?小提琴會很好地做。 – thatidiotguy
已添加代碼。您應該能夠通過刪除列中的一些文本來驗證問題。 – Trent
請將問題代碼插入到您的帖子中,只需鏈接到代碼而無需在此處發佈以及針對Stackoverflow政策。 – Lowkase