WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven - remove white space at top of page (11 posts)

  1. nick.kay
    Member
    Posted 2 years ago #

    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.

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    please consider creating a child theme http://codex.wordpress.org/Child_Themes 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 -->
  3. nick.kay
    Member
    Posted 2 years ago #

    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

  4. tuharrdo
    Member
    Posted 2 years ago #

    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
    ;
    }

  5. Arthur Klein
    Member
    Posted 2 years ago #

    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.

  6. Arthur Klein
    Member
    Posted 2 years ago #

    stet:

    esthetically i like the look of twenty tens header.

  7. casarosada
    Member
    Posted 2 years ago #

    @alchymyth, you just made my weekend, thanks!

  8. rizzledon
    Member
    Posted 2 years ago #

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

  9. ditler
    Member
    Posted 2 years ago #

    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.

  10. sunny6192009
    Member
    Posted 2 years ago #

    hi ditler,

    thank you very much for your code!!

  11. kelliejojo
    Member
    Posted 2 years ago #

    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;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.