Removing the whitespace at the top of your Thesis blog

Post image for Removing the whitespace at the top of your Thesis blog

by bledsoe on January 19, 2010

If you use the Thesis theme for your WordPress blog, you might have created your own custom header image for your site (kind of like mine, above).  If so, you may have noticed that there's a little bit of whitespace between the top of your browser window and the top of your header image (kind of like mine, above).  If you want to get rid of that whitespace, you'll need to add a few lines of code to your Thesis custom.css file.  It's a simple fix, and here's how you do it.

Click on the Thesis Custom Styling option under the Appearance menu in your dashboard sidebar.  This allows you to make changes to your Thesis custom.css file.  At the bottom of this file, insert the following lines of code.

/* The following lines control the whitespace at the very top of the page (i.e., above the header image). If you set the padding-top property value to 0 (zero), your header image will be flush with the top of the page.
*/
.custom #page {
padding-top: 0;
}

You can also set the padding-top property value to something else if you actually want some amount of space between the top of the browser window and the top of your header image.

Save your changes, reload your blog page, and the whitespace will be gone.

Related posts:

  1. How to align your custom header with your navbar
  2. How to turn off WordPress smart quotes
  3. A simple tweak for the WordPress YARPP plugin
  4. Understanding RSS and Web Feeds
  5. Using categories and permalinks on your blog: A simple approach

{ 4 comments… read them below or add one }

paisano May 29, 2010 at 5:50 pm

Hello. I tried this code but I can't remove the extra white space at the top. So frustrating. Been looking everywhere on how to do this.

bledsoe May 31, 2010 at 7:11 am

Well, hell, it worked for me. Do you maybe have some other code customizations that are overriding this one? Like somewhere else where padding-top is set to a number other than zero? I'm not a css expert, but this is all I can think of.

breslinv July 18, 2010 at 12:37 pm

Paisano,

I had the same problem, I modified the layout.css file

Change from padding 2em or something to;
#header_area .page { padding-top: 0; }

Raleigh July 22, 2010 at 2:36 pm

Worked great. Thank you.

Previous post:

Next post: