[英]Table causing IE to go into compatibility view mode (ASP.NET)
I have a table with 3 rows, each with an ASP.NET panel with a gridview in it. 我有一个包含3行的表,每行都有一个带有gridview的ASP.NET面板。 For some reason, this is causing IE8 to go into compatibility view mode, which isn't really ideal.
由于某种原因,这导致IE8进入兼容性视图模式,这并不是很理想。 If I change the table to 3 seperate divs, this works but if I use divs some functionality (ie max height) doesn't work as it does on tables.
如果我将表格更改为3个单独的div,则可以使用,但是如果我使用div,则某些功能(即最大高度)将无法与表格一起使用。 I've also tried 3 seperate tables but to no avail.
我也尝试了3个单独的表,但无济于事。
I would post code but it's on another machine at the moment, I'm just wondering if anyone has ever come across an issue like this. 我会发布代码,但是目前它在另一台机器上,我想知道是否有人遇到过这样的问题。
EDIT: For both of your questions, I do have a valid doctype(XHTML 1.0 transitional) and there are the only data in the tables is in td tags. 编辑:对于您的两个问题,我确实有一个有效的doctype(XHTML 1.0过渡版),并且表中唯一的数据在td标记中。
As pointed out by @Inrbob, you must have a valid doctype at the top of your html. 正如@Inrbob指出的那样,您必须在html的顶部具有有效的文档类型。 Besides check element nesting carefully - you can not put div directly under
<table>
or <tr>
; 除了仔细检查元素嵌套外,您不能将div直接放在
<table>
或<tr>
; it must be within <td>
. 它必须在
<td>
。
我已将问题缩小为我的max-height属性-根据这一发现我发表了新文章,但感谢大家的帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.