我使用以下 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 导航在左角没有正确对齐