WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Header not at the very top of the page (11 posts)

  1. jmtaylor91
    Member
    Posted 3 years ago #

    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?

    Thanks

  2. stvwlf
    Member
    Posted 3 years ago #

    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.

  3. jmtaylor91
    Member
    Posted 3 years ago #

    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...

    Thanks

  4. stvwlf
    Member
    Posted 3 years ago #

    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.

  5. jmtaylor91
    Member
    Posted 3 years ago #

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

    Thanks again

  6. stvwlf
    Member
    Posted 3 years ago #

    Hi

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

  7. gmonk
    Member
    Posted 3 years ago #

    You might try adding to the stylesheet:

    * ( margin: 0; padding: 0; )

  8. afromn23
    Member
    Posted 2 years ago #

    So here is my site.

    http://www.becomingwethepeople.org/test/

    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!

  9. stvwlf
    Member
    Posted 2 years ago #

    @afromn23:

    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;
    }
  10. afromn23
    Member
    Posted 2 years ago #

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

  11. greenfuture
    Member
    Posted 2 years ago #

    this did it for me

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

Topic Closed

This topic has been closed to new replies.

About this Topic