Support » Themes and Templates » Twenty Eleven – remove white space at top of page

  • Help request on where and what code to put in to remove the extra white margin between my header and the top of the page… it’s really too big!

    Also, does anyone have any idea on how to remove the page titles – ‘Home’, ‘About’, ‘Blog’ etc.

    Thanks in advance.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Michael


    Forum Moderator

    please consider creating a child theme in which to make the edits. don’t edit Twenty Eleven directly, as it is important to have an unedited default theme in your wordpress installation. also, all direct edits will be overwritten with the next upgrade.

    the top space is from the top margin in:

    #page {
    	margin: 2em auto;
    	max-width: 1000px;

    how to remove the page titles – ‘Home’, ‘About’, ‘Blog’ etc.

    change to a custom menu – ‘dashboard’ ‘appearance’ ‘menus’

    or if you want to remove the whole menu, remove this whole section from header.php:

    <nav id="access" role="navigation">
    				<h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
    				<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    			</nav><!-- #access -->

    Thanks for your help alchmyth.

    Unfortunately, I have already done lots of editing without creating a child theme. I have just asked the question in another thread of how I can resolve this issue.

    Many thanks, Nick

    hi I created a working child theme put it your code for the top space but does not gone.

    Theme Name: My Twenty Eleven
    Theme URI: http://localhost/wordpress/
    Description: The new child theme of Twenty Eleven created by me
    Author: DanNiellsen
    Template: twentyeleven
    @import url('../twentyeleven/style.css');
    #page {
    	margin: 2em auto;
    	max-width: 1000px


    Arthur Klein


    is there a plug in for white space issue like has been created for header size? Also is there a way to create a plug in so header can be formatted like twenty ten… I really like the second line right justified instead of under the blog title. I love the new features of twenty eleven but esthetically like the look of twenty elevens header.

    Thanks for your help.

    Arthur Klein



    esthetically i like the look of twenty tens header.

    @alchymyth, you just made my weekend, thanks!

    I tried removing the code alchymyth mentioned to get rid of the Home, and About menus but it made no difference, any suggestions??

    What you have there is the code in the original theme. In your child-theme, if you want a different result you have to change something.

    I have a working child-theme with the following added to the style.css:

    #page {
    	margin-top: 0;

    Credits to alchymyth, thanks for the idea.

    hi ditler,

    thank you very much for your code!!

    hey – I added this code and the annoying white line you speak of disappeared:

    /* gets rid of annoying white pixel marks at top of pages */
    #page {
    margin-top: -2px;

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Twenty Eleven – remove white space at top of page’ is closed to new replies.