Title: Centering wordpress website
Last modified: August 20, 2016

---

# Centering wordpress website

 *  Resolved [thomas963](https://wordpress.org/support/users/thomas963/)
 * (@thomas963)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/centering-wordpress-website/)
 * 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/](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!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 5 months ago](https://wordpress.org/support/topic/centering-wordpress-website/#post-3360845)
 * Don’t apply it to the `<body>` element, apply it to a `<div>`.
 *  Thread Starter [thomas963](https://wordpress.org/support/users/thomas963/)
 * (@thomas963)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/centering-wordpress-website/#post-3360851)
 * 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?
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 5 months ago](https://wordpress.org/support/topic/centering-wordpress-website/#post-3360852)
 * 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.
 *  Thread Starter [thomas963](https://wordpress.org/support/users/thomas963/)
 * (@thomas963)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/centering-wordpress-website/#post-3360856)
 * Do I need to create this div around only the elements in the index file or all
   the php files?
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 5 months ago](https://wordpress.org/support/topic/centering-wordpress-website/#post-3360857)
 * You ought to ask this to WooThemes
    [http://www.woothemes.com/support/](http://www.woothemes.com/support/)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Centering wordpress website’ is closed to new replies.

## Tags

 * [body](https://wordpress.org/support/topic-tag/body/)
 * [centering](https://wordpress.org/support/topic-tag/centering/)
 * [css](https://wordpress.org/support/topic-tag/css/)

 * 5 replies
 * 2 participants
 * Last reply from: [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/centering-wordpress-website/#post-3360857)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
