开发者

Weird CSS menu problem

I have this strange problem I need some help with.

This menu code goes to all the links and the stylesheet is style.css:

<div id="slider">
<table width="1282" border="0">
  <tr>
    <td width="336"&g开发者_StackOverflow中文版t;</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>

There should be no difference, but somehow the link on "for-publishers" theres an extra space.

You can see the problem on http://---www---seorapport---se

What could this be?

Just ask if you need further information. Thank you very much.


Your use of <table> and the way you're making that menu is to put it nicely: not good.

You can quickly remove the "extra space" by adding overflow: hidden to #slider.

That will prevent the excessive width of 1282 on the table from causing the "extra space".


Looking more closely, I see there are other issues.

  • This is the problem I just provided a fix for:

    Weird CSS menu problem

  • Here's another gap, and the one I suspect you were talking about:

    Weird CSS menu problem

  • The same stylesheet is being imported three times:

    <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" />
    
  • A bunch of JavaScript files aren't being loaded:

    Weird CSS menu problem

  • The HTML has some nasty validation errors concerning the opening and closing of tags.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜