Table 溢出且未与页面对齐
Table overflow and not aligning with page
我正在尝试让 table 与页面正确对齐,但它位于页面的左侧并且正确显示了内容部分。这是 link:http://www.nta-aberdeen.org.uk/V2/ntc.php?language=dutch.
我会 post CSS 代码,但是这个 post 代码太长了,我完全不知道问题的原因。可以看看 link 上的源代码吗?
但是,这里是文件的 PHP 代码:
<?php require "/customers/2/f/3/nta-aberdeen.org.uk//httpd.www//V2/require/header.php";?>
<section>
<div id="container">
<div id="leftcol">
</div><!-- end left column-->
<div id="content">
<?php include $version."ntc_center.".$filelang.".inc.php"; ?>
</div>
<div id="rightcol">
</div> <!-- end right column -->
</div> <!-- end content -->
</section>
<div class="push"></div>
</div> <!-- end container -->
<footer>
<div><p>Designed and maintained by <a href="mailto:laurens14@example.com">Laurens van Oorschot</a></p></div>
</footer>
</body>
</html>
这里是包含中间部分所需的 table 文件的文件:
<b>Vergelijkings tabel:</b>
<table class="table" border=1>
<tbody>
<tr>
<th>LEEFTIJD</th>
<th>BO</th>
<th>Schotland</th>
</tr>
<tr>
<td>6 - 7 </td>
<td>groep 3 </td>
<td>Primary 2</td>
</tr>
<tr>
<td>7 - 8 </td>
<td>groep 4</td>
<td>Primary 3</td>
</tr>
<tr>
<td>8 - 9 </td>
<td>groep 5 </td>
<td>Primary 4</td>
</tr>
<tr>
<td>9 - 10 </td>
<td>groep 6</td>
<td>Primary 5</td>
</tr>
<tr>
<td>10 - 11 </td>
<td>groep 7</td>
<td>Primary 6</td>
</tr>
<tr>
<td>11 - 12 </td>
<td>groep 8 </td>
<td>Primary 7</td>
</tr>
</tbody>
</table>
<p>In Nederland loopt de schoolleeftijd van 1 oktober tot 1 oktober. In Schotland is dit van 1 maart tot 1 maart.</p>
有什么建议吗?
如果您检查 HTMl,您会发现 table 不在内容 div 中。如果您将所有想要对齐的内容放在 <div id="content">
div 内,您将看到预期的结果。
我正在尝试让 table 与页面正确对齐,但它位于页面的左侧并且正确显示了内容部分。这是 link:http://www.nta-aberdeen.org.uk/V2/ntc.php?language=dutch.
我会 post CSS 代码,但是这个 post 代码太长了,我完全不知道问题的原因。可以看看 link 上的源代码吗?
但是,这里是文件的 PHP 代码:
<?php require "/customers/2/f/3/nta-aberdeen.org.uk//httpd.www//V2/require/header.php";?>
<section>
<div id="container">
<div id="leftcol">
</div><!-- end left column-->
<div id="content">
<?php include $version."ntc_center.".$filelang.".inc.php"; ?>
</div>
<div id="rightcol">
</div> <!-- end right column -->
</div> <!-- end content -->
</section>
<div class="push"></div>
</div> <!-- end container -->
<footer>
<div><p>Designed and maintained by <a href="mailto:laurens14@example.com">Laurens van Oorschot</a></p></div>
</footer>
</body>
</html>
这里是包含中间部分所需的 table 文件的文件:
<b>Vergelijkings tabel:</b>
<table class="table" border=1>
<tbody>
<tr>
<th>LEEFTIJD</th>
<th>BO</th>
<th>Schotland</th>
</tr>
<tr>
<td>6 - 7 </td>
<td>groep 3 </td>
<td>Primary 2</td>
</tr>
<tr>
<td>7 - 8 </td>
<td>groep 4</td>
<td>Primary 3</td>
</tr>
<tr>
<td>8 - 9 </td>
<td>groep 5 </td>
<td>Primary 4</td>
</tr>
<tr>
<td>9 - 10 </td>
<td>groep 6</td>
<td>Primary 5</td>
</tr>
<tr>
<td>10 - 11 </td>
<td>groep 7</td>
<td>Primary 6</td>
</tr>
<tr>
<td>11 - 12 </td>
<td>groep 8 </td>
<td>Primary 7</td>
</tr>
</tbody>
</table>
<p>In Nederland loopt de schoolleeftijd van 1 oktober tot 1 oktober. In Schotland is dit van 1 maart tot 1 maart.</p>
有什么建议吗?
如果您检查 HTMl,您会发现 table 不在内容 div 中。如果您将所有想要对齐的内容放在 <div id="content">
div 内,您将看到预期的结果。