WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Help centering footer text (7 posts)

  1. makta112
    Member
    Posted 2 years ago #

    Hello

    I've placed two lines of text in the footer of my site. I've then centered them so that it looks like this: http://share.xboxlife.dk/files/mdy4yjrlyzcwntk2owqyntlizju1ndy1zmy0ytyzmmi.jpg

    But I want them to look like this and still be centered: http://share.xboxlife.dk/file/yjyznjixmjviy2fkm2m0othhztc5nmfjmzgzotmymwu.jpg

    I've tried adding a left align to the text and then some left-margin to center it, and it worked fine in my own monitor. But to visitors, who use different sized monitors, the margin might be to big or small so that it isn't centered anymore.

    How can I fix this?

    My site: http://www.geimaku.com/

    Thanks.

  2. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    It IS centered in the browser window -- no matter how wide. Is that not what you want?

  3. makta112
    Member
    Posted 2 years ago #

    Hi

    Yes, I know it's centered in all windows but I want it to look like this:

    http://share.xboxlife.dk/file/yjyznjixmjviy2fkm2m0othhztc5nmfjmzgzotmymwu.jpg

  4. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    Do you mean that the two lines of text be left aligned? If so, you will need to put the text content inside an element -- and center the element using a set width and margin: 0 auto; . The text should be left aligned in the enclosing (new) element.

  5. makta112
    Member
    Posted 2 years ago #

    Okay. I've left aligned the tha text by placing it inside these <div align="left">...</div>

    Then I've added these lines of CSS:

    #site-generator div {
    margin: 0 auto !important;
    width: 0 auto !important;
    }

    I'm not sure if this is what you mean, but it didn't work??

  6. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    The <div align="left"> left aligns the div NOT what is inside it. The content inside will be left aligned by default -- unless otherwise specified. You also need a set width that is less than 100% for the auto margin centering to work -- which is not what you have

    Assign an ID to the new div and use that to use EXTERNAL CSS to center it -- i.e.

    <div id="footertext">
       existing content in here
    </div>

    CSS would be:

    #footertext {
       width: 80%;
       margin: 0 auto;
    }
  7. makta112
    Member
    Posted 2 years ago #

    It is as I want it now. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic