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 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题