[Theme: Twenty Eleven]: Adding a Menu – Bug
-
Hi there,
I’m having truble adding a secondary menu on Twenty Eleven (using a child theme, of course) by editing functions.php, header.php and style.css. The code I used in header.php is (based on serveral searches in the WP support forums:
<!-- Begin secondary menu #access2 --> <nav id="access2" role="navigation"> <h3 class="assistive-text"><?php _e( 'Secondary 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 // This is where the menu is added wp_nav_menu( array('container_class' => 'menu-top','theme_location' => 'secondary', 'fallback_cb' => '') ); ?> </nav><!-- end of #access2 -->The menu is looking like the main menu and working properly, but when I publish the theme, my banner image is displayed left of the menu instead of below it. So far the only way to bring it down was using line breaks
in tha code, which leaves a gap between the menu and the banner image and therefore is no useful option.
Does anyone have an idea what I’m missing here – I kinda have the feeling it’s something very, very obvious 😉The page on which this occurred is the demo page for my blog, which means it will be deleted soon – nonetheless, here you go: http://cwdemo3.cluewriting.com/
Thanks for all the help and happy blogging to all,
Yours,
Sarah
-
The issue has been resolved by adding one line in the CSS file so this topic can be closed. I’m posting my CSS solution under this text in case someone will be looking for answers to the same problem:
#branding img { height: 100%; /*was auto*/ clear: both; /*keeps header img in position*/ display: block; width: 100%; margin: 0 auto 0; /*added*/Regards,
Sarah
The topic ‘[Theme: Twenty Eleven]: Adding a Menu – Bug’ is closed to new replies.