php - 当网站托管在远程服务器 wordpress 中时,导航无法正确呈现

标签 php html css wordpress

我使用了以下 html 和 css 代码来实现 word press 导航。当我在所有主要浏览器中运行该网站时,网站的导航会正确呈现。

但是当我在远程服务器上托管它并运行网络时,我发现导航设置不完美,因为它仅在 IE 浏览器中位于本地。

我无法准确猜测我必须修复的位置。

这是我的代码。

#access {
    /*background: #6AA666;*/
    color: #1982D1;
    text-align: center;
    font-family: Tahoma, Verdana, Arial, sans-serif;
    float: left;
    margin-top:-6px;
    width: 100%;
    background-color:#d2e1fc;

  float:left;

  margin-left:-20px;

  text-align:center;
  width:104%;



}

php代码

<nav id="access" role="navigation">
            <h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
            <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
            <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
            <div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></a></div>
            <?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assigned to the primary location is the one used. If one isn't assigned, the menu with the lowest ID is used. */ ?>
            <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
            <div id="logo" style="float:right;width:150px; margin-top:10px;"></div>
        </nav><!-- #access -->

http://i.stack.imgur.com/DgakQ.png 导航在左 Angular 没有正确对齐

最佳答案

为横幅指定特定的高度和宽度我可以解决上述问题

关于php - 当网站托管在远程服务器 wordpress 中时,导航无法正确呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18147331/

相关文章:

css - 在 Internet Explorer 中设置列​​表项的样式

html - 无法使用文本溢出 :ellipsis correctly

javascript - 将背景图片设置为 100%

javascript - 函数适用于一个 div 但不适用于另一个

javascript - 为什么我的 jQuery 函数会触发两次?

php - html中元素的可见性属性或显示属性哪个更好?

javascript - 将 html 渲染到 View MVC

php - Mysql 查询每日最高票数

php - 空格中断 MySQL 字符串搜索

PHP date() 可靠性