0

我正在尝试修改 Drupal 菜单:page.tpl.php

<?php if ($main_menu): ?>
        <div id="navigation-wrapper">
            <div id="navigation">

                <nav id="main-menu" role="navigation" tabindex="-1">
                  <?php
                  // This code snippet is hard to modify. We recommend turning off the
                  // "Main menu" on your sub-theme's settings form, deleting this PHP
                  // code block, and, instead, using the "Menu block" module.
                  // @see https://drupal.org/project/menu_block
                  print theme('links__system_main_menu', array(
                    'links' => $main_menu,
                    'attributes' => array(
                      'class' => array('links', 'inline', 'clearfix'),
                    ),
                    'heading' => array(
                      'text' => t('Main menu'),
                      'level' => 'h2',
                      'class' => array('element-invisible'),
                    ),
                  )); ?>
                </nav>


              <?php print render($page['navigation']); ?>
            </div>
        </div>
        <?php endif; ?>

而CSS是:

#navigation-wrapper{
    overflow:hidden;
    width:100%
    background:#ff6005;

}
#navigation{
    width:950px;
    margin:0 auto;
    background:#ff6005;
}
#navigation ul li
{
    display:inline;
    padding:5px 10px 6px 10px;  
}

但我的输出只为 div 生成背景颜色navigation!我期待一个覆盖全宽的背景颜色。我的 CSS 有什么问题 >

4

1 回答 1

2
#navigation-wrapper{
    overflow:hidden;
    width:100%;
    background:#ff6005;

你错过了一个;后宽度。

于 2013-09-26T12:10:01.823 回答