Treehouse: Grow your CSS skills. Land your dream job.

What is this extra margin in theme?

  • # March 11, 2010 at 8:11 am

    I’ve designed a theme, here’s the screenshot:
    Now, I want to convert it to a WP theme, The code [html/css] does not change, but I get this:
    Notice the margin in body element. And Firebug isn’t helping.

    Here’s the actuall theme, (It’s not complete yet, but) just in case.

    # March 11, 2010 at 5:06 pm

    I’ve been looking around a bit and I have found what the problem is, but not what the cause is.
    Open the page (in wordpress) –>open firebug –> click on body –> click on edit:
    Right at the top is a "." (fullstop). Once you delete that, everything jumps back up. The problem is that I can’t find where this is actually coming from, but it’s a step in the right direction :)

    Did you use the starkers theme and create it from scratch, or edit the default?

    # March 12, 2010 at 9:38 pm

    Thanks. I used a slightly modified version of Chris’s BLANK theme. It’s really a weird problem, and I have this in my other themes as well and I fixed by using Negative Margins.
    Any help will be appreciated.

    # March 13, 2010 at 12:44 am

    Hi guys,

    If I can attach a file, then here it is. The theme, all fixed. No extra margin at the top. At least on my end :)

    Hope this helps and works on your end just as well. Just replace the one I’m attaching with the one you got. Or mainly just the header.php file. :)

    Thank you,


    # March 13, 2010 at 11:57 am

    Thanks! It works.
    The problem was that header.php file is encoded in UTF-8. Converting it to ASCII fixed it.
    It’s really weird. :geek:

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.