WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Centering wordpress website (6 posts)

  1. thomas963
    Member
    Posted 1 year ago #

    Hello

    Iam having some trouble with the wordpress template "MyStyle" from wooThemes. There is no option to chose between a boxed or stretched layout. The standard layout is stretched. The problem is that i want it boxed so i can put in my own background pattern.

    Because there is no option to slect a boxed layout, I'm forced to adjust the css.

    this is the body in the style.css file:
    As you can see, I already added the margin and width attribute and this is the result: http://www.thomas-timmers.be/wordpress/

    body {
    margin: 0 auto;
    width: 960px;
    margin: 0 auto;
    font-size: 1.4em;
    line-height: 1.618;
    color: #6c6360;
    font-family: "Open Sans", sans-serif;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    background: #fcfcfc;
    }

    Now my question is why the body is aligned on the left side but not centered? I tought that this (margin: 0 auto;) attribute should center the whole website.

    Anyone know why the website is not centered? do I need to do something else or more?

    Thanks!

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Don't apply it to the <body> element, apply it to a <div>.

  3. thomas963
    Member
    Posted 1 year ago #

    ok, thanks for the quick reply but what div? do I need to create an new div? and do i need this new div to link with my content?

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    The <div> that holds your elements you want centred. If there isn't one, wrap a <div> around all of the elements you want centred.

  5. thomas963
    Member
    Posted 1 year ago #

    Do I need to create this div around only the elements in the index file or all the php files?

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    You ought to ask this to WooThemes
    http://www.woothemes.com/support/

Topic Closed

This topic has been closed to new replies.

About this Topic