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条)

报告相同问题?

悬赏问题

  • ¥20 求快手直播间榜单匿名采集ID用户名简单能学会的
  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历