我有这个奇怪的问题,我需要一些帮助。
此菜单代码转到所有链接,样式表为style.css:
<div id="slider">
<table width="1282" border="0">
<tr>
<td width="336"></td>
<td width="96"><a href="?p=for-publishers" <?php echo ($_GET['p']=='for-publishers') ? 'style="color:#98b755"' : '' ?>>Publishers intro</a></td>
<td width="91"><a href="?p=for-publishers/keyfeatures" <?php echo ($_GET['p']=='for-publishers/keyfeatures') ? 'style="color:#98b755"' : '' ?>>Key features</a></td>
<td width="125"><a href="?p=for-publishers/private-ad-exchange" <?php echo ($_GET['p']=='for-publishers/private-ad-exchange') ? 'style="color:#98b755"' : '' ?>>Private Ad exchange</a></td>
<td width="147"><a href="?p=for-publishers/optimize-demand-partners" <?php echo ($_GET['p']=='for-publishers/optimize-demand-partners') ? 'style="color:#98b755"' : '' ?>>Optimize Demand Partners</a></td>
<td width="48"><a href="?p=for-publishers/display-textads-mobile" <?php echo ($_GET['p']=='for-publishers/display-textads-mobile') ? 'style="color:#98b755"' : '' ?>>RTB</a></td>
<td width="34"> <a href="?p=for-publishers/faq" <?php echo ($_GET['p']=='for-publishers/faq') ? 'style="color:#98b755"' : '' ?>>FAQ</a></td>
<td width="371"><a href="?p=get-started" <?php echo ($_GET['p']=='get-started') ? 'style="color:#98b755"' : '' ?>>Get Started</a></td>
</tr>
</table>
</div>
应该没有什么区别,但是“for-publishers”上的链接还有一个额外的空间。
您可以在http://---www---seorapport---se
上看到问题这可能是什么?
询问您是否需要更多信息。非常感谢你。
答案 0 :(得分:3)
您对<table>
的使用以及您制作该菜单的方式非常好:不好。
您可以通过将overflow: hidden
添加到#slider
来快速删除“额外空间”。
这样可以防止width
1282
table
过多<link href="style.css" rel="stylesheet" type="text/css" /></head>
..
<link href="style.css" rel="stylesheet" type="text/css" />
<div class="menu">
..
--><link href="style.css" rel="stylesheet" type="text/css" />
造成“额外空间”。
仔细观察,我发现其他问题。
这是我刚才提供修复的问题:
这是另一个差距,也是我怀疑你在谈论的那个:
正在导入相同的样式表三次:
{{1}}
未加载大量JavaScript文件:
HTML有一些关于标签打开和关闭的nasty validation errors。