Internet Explorer导致布局出现问题。

4

我在Internet Explorer中的应用程序中遇到了基本问题。 在所有其他主要浏览器Chrome,Safari,Opera和Firefox中,我在其他主要浏览器中没有遇到此布局问题,但在Internet Explorer中却有。

打开应用程序(Internet Explorer)

问题

为什么最后一列表格显示在最后一列表格下方而不是旁边? 以下是代码:

$outputform.=" 
<form action='QandATable.php' method='post' id='sessionForm'>
<table>
<tr>
<th>9: Room and Building:</th>
<th>Building: {$buildingHTML}</th>
<th>Room: {$roomHTML}</th>
</tr>
</table>

</form>
";

echo $outputform;
1个回答

0

IE不喜欢HTML错误,在你的情况下,你在th标签内有一个关闭的表单标签:

<form action='QandATable.php' method='post' id='sessionForm'>
<table>
<tr>
<th>9: Room and Building:</th>
<th>Building: <select name="buildings" id="buildingsDrop" onchange="getRooms();">
<option value="">Please Select</option>
<option value='Canalside East'>Canalside East</option>
<option value='Canalside West'>Canalside West</option>
</select></form></th>
<th>Room: <select name="rooms" id="roomsDrop">
<option value="">Please Select</option>
</select></th>
</tr>
</table>

</form>

我在谈论这个标签:

</select></form></th>

删除多余的表单标签后,表格将会正常显示。我已经使用您的HTML源代码进行了测试。


通过快速运行页面通过W3C验证器找到了同样的问题。@user1881090这也是为什么你在其他问题中的ajax在IE中不起作用的原因。 - charlietfl
谢谢,我需要验证我的页面 :) - user1881090

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接