2012-12-24 84 views
4

我有我的应用程序在Internet Explorer中的基本问题。在所有其他主流浏览器中,Chrome,Safari,Opera和Firefox,我在其他主流浏览器中都没有这个布局问题,但是在Internet Explorer中我却没有。Internet Explorer导致与布局问题

Open Application (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; 

回答

0

IE不喜欢HTML错误的,你如果你有一个个标签内的关闭表单标签:

<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来源测试过它。

+0

通过W3C验证程序快速运行页面发现相同的东西。 @ user1881090这也是为什么你的ajax不能在你的其他问题的IE中工作 – charlietfl

+0

谢谢,我将不得不验证我的网页然后:) – user1881090