WordPress.org

Ready to get started?Download WordPress

Forums

Background Positioning (7 posts)

  1. redhead412
    Member
    Posted 4 years ago #

    This may seem like a rather simple question, but for some reason I can not figure this out. On my website, I have a large header, and the main content begins on top of it, and then is supposed to fade into my background which is just some simple lines and a color. For some reason though, the background overlaps the header image, therefore covering up part of it. I want my background to start at the bottom of the header image. I've tried using background-position: 0 -220px, but that doesn't do anything. How do I move the starting postion of the background in #content down?

    http://stangerdesigns.com/bhc/

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    add a top margin to it.

    margin-top: 220px

  3. redhead412
    Member
    Posted 4 years ago #

    Right now I have margin-top: -220px to move all the content down, but I need the background to go further down than that...here's what I have

    #content {
    margin-top:-220px;
    font-size: 1.2em;
    background: url('images/bgleft.jpg');
    background-position: 0 -320px;
    }

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    oh...well a negative value would move the image up....try a positive to move it down

    background-position: 0 220px;

  5. redhead412
    Member
    Posted 4 years ago #

    no luck :(

    does it matter that the background image is only 1 px tall...it shouldn't I don't think?!

    Also I'm using the default wordpress theme to create this on.

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    well, could just add the image in it's own class where you need it?

    <div id="content">
    <div class="contentImage">

    stuff

    </div>
    </div>

    the just style the image onto .contentImage in the css?

  7. redhead412
    Member
    Posted 4 years ago #

    Thanks for the help :D I couldn't seem to get that method to work either, but I figured out another trick.

Topic Closed

This topic has been closed to new replies.

About this Topic