Support » Themes and Templates » Header not at the very top of the page

  • Resolved jmtaylor91


    My site is here

    I want my header to be at the very top of the page and I’m not quite sure how to do that.

    What I’m hoping to achieve with it is to have a bar across the top with a logo, title (not necessarily my blog title) and a search bar on the right hand side.

    Any help would be appreciated.

    I’m also curious as to how you would style a search box. I’m assuming you make it invisible and use a background image for it?


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

    On line 77 of your stylesheet, style.css is this code

    #header {
      background: none repeat scroll 0 0 #F0EDFF;
      float: left;
      margin: 10px 0;
      width: 100%;

    Change the margin line to
    margin: 0 0 10px;
    to remove the blank space at the top of your site.

    Hi, I just tried that but the header still isn’t at the top of the page.

    I see where you’re coming from but for some reason my body starts lower than the top. I also just checked my body’s margins but they’re as they should be too.

    Not sure where to go from here…


    Your header is now at the top of the screen on my computer.

    The first thing I suggest is clear your browser cache, refresh, and truy again.

    If there is still a gap at the top you may be experiencing a problem with the new WordPress 3.1 admin bar.

    In the dashboard menu, click on Users and bring up your profile page. Remove the check in the box about displaying the Admin Bar on the front end of the site and click the Update button at the bottom of the screen. Refresh your homepage and see if that resolved your issue.

    Thanks very much! It was the admin bar, for some reason I guess it just became transparent on my site.

    Thanks again


    I have seen that happen before (transparent admin bar). That is why I suspected it might be the problem.

    You might try adding to the stylesheet:

    * ( margin: 0; padding: 0; )



    So here is my site.

    I could not find the line 77 with #header in the style.css sheet. Is it because I added a child theme style.css sheet to the site? I don’t know too much.

    Any help would be greatly appreciative thank you!




    I assume you mean you don’t want the blank space at the top of your header. Line 77 referred to whatever theme that person was using on their site. It will not be that on your site.

    From what I see your issue is here:
    style.css, line 74

    #page {
        margin: 2em auto;   ==> change to      margin: 0 auto 2em;
        max-width: 1000px;



    Thank you ever so much, stvwlf!!! Works beautifully now!!!



    this did it for me

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Header not at the very top of the page’ is closed to new replies.