WordPress.org

Ready to get started?Download WordPress

Forums

Center an Image? (7 posts)

  1. Jam
    Member
    Posted 2 years ago #

    How can I center my banner image below the menu? I know the code is in home.php

    http://www.lahsrobotics.org/portal/

    Thanks !

  2. vtxyzzy
    Member
    Posted 2 years ago #

    Try adding this to the end of style.css:

    div.home > p > a > img {
       position: relative;
       left: -12%;
    }
  3. Jam
    Member
    Posted 2 years ago #

    Hmm. This did push it to the left, but its not centered. I can try changing the left justification percentage.

    But how can I get the absolute center?

  4. vtxyzzy
    Member
    Posted 2 years ago #

    The image was originally at absolute center - the menu was not.

    However, the image is pushed right by the logo image, so you have to compensate by moving it left.

    The only way I know to have it at absolute center again is to restructure the divs.

  5. Jam
    Member
    Posted 2 years ago #

    Oh, I see. It's looking with with -8%. Thank you very much! Not sure if this will change with different resolutions though.

  6. vtxyzzy
    Member
    Posted 2 years ago #

    Since the offset is a percent, it should be OK.

  7. Jam
    Member
    Posted 2 years ago #

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.