0

我一直在为一家家族企业创建一个网站。它主要是创建的,但是我无法让它在 Chrome 或 Safari 中工作。具体来说,从页面到页面的链接不起作用。单击左侧的选项卡或顶部的徽标时,您应该被定向到不同的页面。这在 IE 上完美运行。但是,它们在其他 2 中根本不起作用。我看了又看,找不到原因。如果有人可以提供帮助,将不胜感激。

我意识到 Chrome 或 Safari 中的标签并不像 IE 中那样统一。这不是目前要解决的重要问题。

这是其中一个页面的 HTML,因此您可以看到我做了什么以及我在哪里搞砸了。

    <!DOCTYPE html>
<html>
    <head>
        <title>
            BERK Consulting LLC
        </title>
        <style type="text/css">
            a:link {color:white; }
            a:visited{color:white; }
            a:hover {color:white; }
            body {background-color:#F2E8DE}
        </style>
        <script type="text/javascript">

        </script>
    </head>
    <body>
        <div id="Main" style="padding-left:150px; position: absolute; width: 800px;">
            <p style="font-size: 18pt; text-align: justify; padding-top: 200px; padding-left: 200px;">
            BERK was founded on the desire to remove the bureaucracy, complexity, and hidden agendas from consultancy.  When you deal with BERK, you’re dealing directly with the expertise, not a salesperson or a subcontracting agency. <br /> <br />

Our down-to-earth approach combined with extensive 'in the seat' supply chain expertise allows us to advise you on key supply chain evolution decisions, allowing you to maintain focus on managing your business. <br /> <br />

We have eliminated the green beans from our team so that we can establish sustainability in your team and at an affordable rate. 
            </p>
            <p style="text-align: right; font-size: 20pt;"> <strong>
...Securing the Last Piece® <br />
                <a href="http://www.linkedin.com/company/269236?trk=tyah" target="_blank"> <img src="http://berkllc.com/images/LinkedIn2.png" alt="Follow Us" style="float:right;" width="150px" /> </a>
            </strong> </p>
        </div>
        <div id="Tabs" style="background-color:#502800; text-align:right; width:280px; padding-bottom:400px; padding-top:50px; padding-left:20px;">
        <a href="index.html" style="padding-left:175px;"> <img src="http://berkllc.com/images/BERKPic1.jpg" alt="BERK" /> </a>
            <p style="font-size:11pt; padding-top:50px; ">
            <span style="font-family:'Copperplate Gothic Bold'; ">
            <a href="index.html" style="color: black; background-color:#F2E8DE; padding-left:93px; padding-right:88px; padding-top:8px; padding-bottom:8px"> Home </a> <br /> <br />
            <a href="BERKWhoWeAre.html" style="background-color:#1F497D; padding-left:62px; padding-right:62.5px; padding-top:8px; padding-bottom:8px"> Who We Are </a> <br /> <br />
            <a href="BERKWhatWeDo.html" style="background-color:#1F497D; padding-left:62px; padding-right:63px; padding-top:8px; padding-bottom:8px"> What We Do </a> <br /> <br />
            <a href="BERKWhoWeveHelped.html" style="background-color:#1F497D; padding-left:36px; padding-right:37px; padding-top:8px; padding-bottom:8px"> Who We've Helped </a> <br /> <br />
            <a href="BERKOurNetwork.html" style="background-color:#1F497D; padding-left:57.5px; padding-right:57px; padding-top:9px; padding-bottom:9px"> Our Network </a> <br /> <br />
             <a href="BERKWhatAreYouMissing.html" style="background-color:#1F497D; padding-left:23px; padding-right:22px; padding-top:8px; padding-bottom:8px">What Are You Missing </a> <br /> <br />
            <a href="BERKContactUs.html" style="background-color:#1F497D; padding-left:66px; padding-right:65px; padding-top:8px; padding-bottom:8px"> Contact Us </a> <br />
            </p>
            </span>
        </div>
        <div id="blank" style="width:100%; padding-top:1px;">
        </div>
        <div id="Legal1" style="background-color:#1F497D; position: absolute; padding-top:125px; width:994px; text-align:center;">
        <table id="Legal2" border="0" style="border-collapse:collapse; font-size:8pt; color:white; margin-left: auto; margin-right: auto;" cellpadding="10px">
            <tr>
                <th  style="cursor: pointer;" onclick="location.href='index.html'">
                Home
                </th>
                <th style="cursor: pointer;" onclick="location.href='BERKContactUs.html'">
                Contact Us
                </th>
                <th style="cursor: pointer;" onclick="location.href='BERKDisclaimers.html'">
                Legal Disclaimers
                </th>
                <th style="cursor: pointer;" onclick="location.href='BERKTrademark.html'">
                Trademark/Privacy
                </th>
                <th style="cursor: pointer;" onclick="location.href='BERKSitemap.html'">
                Site Map
                </th>
            </tr>
        </table>
        <p style="text-align:center; font-size:6pt; color:white;">
        © 2009 BERK Consulting, LLC. All Rights Reserved.
        </p>
        </div>

    </body>
</html>
4

2 回答 2

0

这是草率但添加

z-index: 900;position: relative;

风格:

<div id="Tabs" style="background-color:#502800; text-align:right; width:280px; padding-bottom:400px; padding-top:50px; padding-left:20px;z-index: 900;position: relative;">

并添加

z-index: 1;

到样式

<div id="Main" style="padding-left:150px; position: absolute; width: 800px;z-index: 1;">

在不相关的说明中,如果您想了解 html/css/javascript 的良好实践和样式,我建议您访问此站点此站点。

于 2013-06-27T21:25:13.997 回答
0

问题是您的“主要” div 覆盖了链接。就在我开始打字的时候,我被叫走了。无论如何,不​​要相信 IE 能做到这一点。首先信任 Chrome。

于 2013-06-27T22:34:13.397 回答