Shop Menu

WP Twenty Eleven – Remove White Space At Top Of Page

Goal: Remove white space from top of page (between top of header and top of page).

Solution: Add the following to Child theme’s style.css file:

/* Remove white space between top of header and top of page */
#page {
margin-top: 0;
}

Let’s also remove the gray line at the top of the header. Add the following to Child theme’s style.css file:

/* Remove gray line at top of header */
#branding {
border-top: 0;
}

What I’m running:

  • WordPress: v3.2.1
  • Parent theme: Twenty Eleven, v1.2
  • Child theme: Custom for ReidWalley.com

, , ,

5 Responses to WP Twenty Eleven – Remove White Space At Top Of Page

  1. Sophie Larter February 10, 2012 at 7:18 am #

    Do you have to add this code in a particular place?  Or just anywhere in the style sheet?  Many thanks

    • Reid Walley February 10, 2012 at 12:52 pm #

       
      Hi Sophie,

      You can place the CSS anywhere in the stylesheet. But, generally, I
      like to place CSS in the order that it will appear on the page (ie: body
      & header CSS toward the beginning of the stylesheet and footer CSS
      toward the end of the stylesheet).

  2. Charles July 29, 2012 at 6:55 pm #

    Thank you so much. I have been trying to do that for four hours.

    • Reid Walley August 8, 2012 at 11:04 pm #

      You’re welcome, Charles. Glad it worked out.

  3. Randy.mx August 14, 2012 at 7:01 pm #

    Thanx a lot!

Leave a Reply

css.php