WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Second background image not at the very top of the page (6 posts)

  1. tastyjams
    Member
    Posted 2 years ago #

    Hey WordPress community,

    I'm having trouble with a site I'm working on where the second banner I have setup is rendering just a few pixels below the top of the page when I want it to render RIGHT at the top of the page.

    Here's a picture of what's going on.

    Here's the code I'm using:

    [CSS code moderated - please post a link to your site]

    Any idea what's going on or how to fix this? Many thanks!!

  2. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    There is no doubt a margin or padding or other CSS code that is creating that space at the top. But it is impossible for anyone else to help with where that problem is unless you can post an actual link to your site -- so someone can look at the code in Firebug. You could try doing that yourself, however.

  3. tastyjams
    Member
    Posted 2 years ago #

    Ah I see - I have lifted the lock on the site so that it can be looked at.

    http://theplaygroundkids.com/

    Any ideas?

  4. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    No sweat -- in the CSS stylesheet, just change the margin to from 10 to zero in the following declaration:

    .header {
        height: 280px;
        margin: 10 auto;
        position: relative;
        width: 997px;
        z-index: 50;
    }

    Leave the "auto" there as that centers the image -- so it should be:

    margin: 0 auto;

    Cute site (so far anyway), BTW.

  5. tastyjams
    Member
    Posted 2 years ago #

    Thanks for checking it out! I see that repeated a couple of times in the stylesheet, which snippet of code specifically should I be treating? Thank you again!

  6. tastyjams
    Member
    Posted 2 years ago #

    Oh cool, actually I found it! Thanks WPyogi you're a life saver!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.