douxi3233 2015-02-09 09:32
浏览 52
已采纳

PHP / CSS / HTML网络导航在Chrome中充当图像

I've been working on a small website but I've got a bit stuck.

In Internet Explorer the website navigation works fine, however in Google Chrome the website is not clickable.

I thought it might have been due to the background image of the navigation so I removed it and that didn't seem to help at all, I ended up removing the style sheet itself and even after that it will wouldn't work.

I have the menu setup as menu.php which is 'included' in all pages.

Below is the menu.php code and the style sheet applied to the menu, the menu is included in each page via <?php include 'menu.php'?>

Where am i going wrong?

ul.menu {
list-style-type:none;
width:auto;
position:relative;
display:block;
height:33px;
font-size:.6em;
font-family:Verdana,Helvetica,Arial,sans-serif;
margin:0;
padding:0;
}

ul.menu li {
display:block;
float:left;
margin:0;
padding:0;
}

ul.menu li a {
float:left;
color:#A79787;
text-decoration:none;
height:24px;
padding:9px 15px 0;
font-weight:normal;
}

ul.menu li a:hover,.current {
color:#fff;
text-decoration:none;
}

ul.menu .current a {
color:#fff;
font-weight:700;
}

/*NAVY* --Needs updating */
ul.menu.red{
background: #005581;
}

ul.menu.red li a:hover, .menu.red li.current {
background: #005581;
}
<?php
if ($_SESSION['acc_t'] == 1)
    { echo'<!DOCTYPE html>    <link rel="stylesheet" type="text/css" title="CSS" href="styles/style3.css" media="screen">
<link rel="stylesheet" media="all" type="text/css" href="styles/menu_style_old.css" />

                    <table width="900px">
                        <tr>
                            <td>
                            <a name="#top">
                            <ul class="menu red">
                                <li class="current"><a href="index.php" target="_self">Home</a></li>
                                <li class="current"><a href="myorders.php" target="_self">My Orders</a></li>
                                <li class="current"><a href="mydepartment.php" target="_self">My Department</a></li>
                                <li class="current"><a href="alldepartment.php" target="_self">All Departments</a></li>
                                <li class="current"><a href="admin.php" target="_self">Administration</a></li>
                                <li class="current" style="float:right;"><a href="preferences.php" target="_self">My Preferences</a></li>
                        </ul>
                    </td>
                        <td style="float:right; text-align:right;font-size:12px;vertical-align:top;color:#fff;padding:6px;">
                            <?php
                                    echo ("Date/Time: ");
                                    echo date("h:m:s");
                                    echo ("- ");
                                    echo date("Y-m-d ");
                        ?><br />
                    </td>
                </tr>
        </table>
</div>
';} else { echo'
<link rel="stylesheet" type="text/css" title="CSS" href="styles/style3.css" media="screen">
<link rel="stylesheet" media="all" type="text/css" href="styles/menu/menu_style1.css" />      
                    <table width="900px">
                        <tr>
                            <td>
                            <a name="#top">
                            <ul class="menu red">
                                <li class="current"><a href="index.php" target="_self">Home</a></li>
                                <li class="current"><a href="myorders.php" target="_self">My Orders</a></li>
                                <li class="current"><a href="mydepartment.php" target="_self">My Department</a></li>
                                <li class="current"><a href="alldepartment.php" target="_self">All Departments</a></li>
                                <li class="current" style="float:right;"><a href="preferences.php" target="_self">My Preferences</a></li>
                        </ul>
                    </td>
                        <td style="float:right; text-align:right;font-size:12px;vertical-align:top;color:#fff;padding:6px;">
                            <?php
                                    echo ("Date/Time: ");
                                    echo date("h:m:s");
                                    echo ("- ");
                                    echo date("Y-m-d ");
                        ?><br />
                    </td>
                </tr>
        </table>
</div>    
';}
?>

</div>
  • 写回答

2条回答 默认 最新

  • dongyun3805 2015-02-09 09:41
    关注
        </table>
    </div>
    ';} else { echo'
    <link rel="stylesheet" type="text/css" title="CSS" href="styles/style3.css" media="screen">
    

    ';} else { echo'

    has no begin and end php tag

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog