我的代码无法在Chrome或Safari中使用

时间:2013-06-27 21:17:40

标签: html google-chrome safari

我一直致力于为家族企业创建网站。它主要是创建的,但我无法在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>

2 个答案:

答案 0 :(得分: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的良好做法和风格,我会建议您访问this sitethis site

答案 1 :(得分:0)

问题是你的“主要”div正在掩盖链接。就在我开始打字的时候,我被叫走了。在任何情况下,不要相信IE这样做。首先信任Chrome。