WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Centering my header image (based on default) (3 posts)

  1. mattshepherd
    Member
    Posted 6 years ago #

    So far, I think I'm doing all right with WordPress. I've made my own header, and copied the "default" theme into a new folder, re-named it "shep" and uploaded it so I can fool around without irrevocable damage.

    I read the tutorials on WP basic structure and how to change your header.

    First point: the tutorial on how to change your header is excellent, but doesn't seem to contain any information on what to do about the blue border that surrounds the header once you change the default image. That seems to be an oft-asked question in the forums, so maybe it should be added to the tutorial? Just sayin'.

    Anyway. I finally figured out the blue border, getting rid of it by re-sizing the #header and #headerimg sections of style.css (about halfway down the file).

    Now, though, I can't center the header image. It drifts about ten pixels to the right.

    I can't figure this out at all. The style.css has it at "no-repeat bottom center" and the old header was centered. I haven't changed the other settings for the default image at all, but it persistently sits a few pixels left of where it should be.

    Is the whole default template off-center?

    If anyone could tell me why this is happening, the site is at http://shep.ca.

    Thanks!

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Way down in your CSS (around line 240 or so) you have this:

    #header {
    background-color: #fffff;
    margin: 0 0 0 1px;
    padding: 0;
    height: 192px;
    width: 740px;
    }

    Change that margin to this:
    margin: 0px 0px 0px 10px;

    That should slide it over enough.

  3. mattshepherd
    Member
    Posted 6 years ago #

    Perfect! Thanks a million.

    I guess the "why" of it is bothering me, too -- if the header is centered in style.css, what makes it slip left like that?

Topic Closed

This topic has been closed to new replies.

About this Topic