嗯,我有些奇怪的东西。 2表应该直接跟着对方 之间没有任何东西,所以新表应该直接启动。 但是有些页面显示了它们之间的空行,而其他页面却没有。表间不需要的垂直空间
这两个页面都有相同的html标头,相同的文档样式,字符集.. 没有css样式适用于这些表。 每个表开始为
<table width="90%" border="0" align="center" cellpadding="10" celspacing="0">
下面是冲突的页面:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org /TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sapec ontwikkeld vision toepassing in industrie</title>
<?php // writing the page menu on top
include './BaseTemplate.php';
WriteHeader();
?>
</head>
<body>
<div id="background"><img src="./assets/image/background2.jpg" width="640" height="400" class="stretch" /></div>
<table width="90%" border="0" align="center" cellpadding="10" cellspacing="0" >
<?php
WriteMenu();
?>
</table>
<table width="90%" border="0" align="center" cellpadding="10" cellspacing="0" >
<tr><td bgcolor="#CCCCCC" colspan="2" valign="top" >
这里是那不显示冲突页面,请注意,这两个页面的PHP代码输出完全相同,所以不是真正相关的。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Contact </title>
<?php // writing the page menu on top
include './BaseTemplate.php';
WriteHeader();
?>
</head>
<body>
<div id="background"><img src="./assets/image/background2.jpg" width="640" height="400" class="stretch" /></div>
<table width="90%" border="0" align="center" cellpadding="10" cellspacing="0" >
<?php
WriteMenu();
?>
</table>
<table width="90%" border="0" align="center" cellpadding="10" cellspacing="0" >
<tr>
<td bgcolor="#CCCCCC" width="45%" valign="bottom" >
尝试将cellpadding =“10”更新为cellpadding =“0” – Aru 2014-10-16 10:13:40
“cellspacing”拼写错误。你能发布紧接在表之前的代码,因为这可能会导致问题。 – JakeSteam 2014-10-16 10:16:16
此外第二个例子效果与cellpadding = 10 – user613326 2014-10-17 13:31:09