WordPress.org

Ready to get started?Download WordPress

Forums

Center something (2 posts)

  1. makta112
    Member
    Posted 1 year ago #

    Hello

    I'm trying to center the top banner on my site.

    But I'm unable to do so.

    Here's the code I'm using now:

    #Topad {
        position: absolute;
        top: 7em;
    }

    I've tried all these lines:

    #Topad {margin-left: auto;
    margin-right: auto;}

    In the HTML too:

    <div align="center">...</div>

    <center>...</center>

    My site: http://geimaku.com

    Nothing seems to work. Help, please.

    Thanks.

  2. Andrew Nevins
    Spam zapper & Volunteer Moderator
    Posted 1 year ago #

    You cannot centre while positioned absolute (unless you manually do it for a certain window width)

Topic Closed

This topic has been closed to new replies.

About this Topic