Title: Website not centered
Last modified: August 20, 2016

---

# Website not centered

 *  [sentientprod](https://wordpress.org/support/users/sentientprod/)
 * (@sentientprod)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/)
 * My whole wordpress is aligned to the left for some reason. I’ve tried adding `
   margin: 0 auto;` to different spots on the stylesheet and header. I’ve also tried
   to change the min-width and width of the page lots of times. Nothing seems to
   work! I’m getting so frustrated with this… Can someone please help me out?

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/website-not-centered/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/website-not-centered/page/2/?output_format=md)

 *  [viktor89](https://wordpress.org/support/users/viktor89/)
 * (@viktor89)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321424)
 * put the content in a div wrapper and make it margin auto. Post a link and I can
   be more specific
 *  [pdxchambers](https://wordpress.org/support/users/pdxchambers/)
 * (@pdxchambers)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321429)
 * Have you tried placing the body content in a wrapper DIV? Something like this…
 *     ```
       <body>
          <div id="wrapper">
             ...site contents...
          </div>
       </body>
       ```
   
 * Then in your style sheet create a “wrapper” id…
 *     ```
       #wrapper {
          margin: 0 auto;
       }
       ```
   
 *  Thread Starter [sentientprod](https://wordpress.org/support/users/sentientprod/)
 * (@sentientprod)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321433)
 * Yeah already tried that, didn’t work. Actually my theme came with that already…
 *  [viktor89](https://wordpress.org/support/users/viktor89/)
 * (@viktor89)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321442)
 * Try
 *     ```
       #wrapper{
       margin: auto;
       }
       ```
   
 * insted of
 *     ```
       #wrapper{
       margin: 0 auto;
       }
       ```
   
 *  [pdxchambers](https://wordpress.org/support/users/pdxchambers/)
 * (@pdxchambers)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321461)
 * Can you post the relevant code?
 *  Thread Starter [sentientprod](https://wordpress.org/support/users/sentientprod/)
 * (@sentientprod)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321488)
 * Which code do you want? The stylesheet? The main css stylesheet? The header? 
   And I tried `margin: auto;` and that didn’t work.
 *  [pdxchambers](https://wordpress.org/support/users/pdxchambers/)
 * (@pdxchambers)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321516)
 * > Which code do you want? The stylesheet? The main css stylesheet? The header?
 * Hmm… are you using multiple style sheets? Originally I was hoping to get a look
   at your `#wrapper` code but now I’m wondering if it is possible you’re either
   a) pointing to the wrong external stylesheet in your `<link>` tag, or b) overriding
   the #wrapper definition with an internal `<style>` declaration.
 *  Thread Starter [sentientprod](https://wordpress.org/support/users/sentientprod/)
 * (@sentientprod)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321599)
 * My theme uses a stylesheet and a custom stylesheet. The wrapper code is the custom
   stylesheet and the html part is in the header. This is what the wrapper code 
   looks like now:
 * #Wrapper { width:100%; margin: 0 auto; }
 * `
 *  Thread Starter [sentientprod](https://wordpress.org/support/users/sentientprod/)
 * (@sentientprod)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321606)
 * Here is the code for the custom css called sentient.css [http://pastebin.com/dgz8agnR](http://pastebin.com/dgz8agnR).
 * Also, here’s the header [http://pastebin.com/NAu3k3jN](http://pastebin.com/NAu3k3jN)
 * And the stylesheet [http://pastebin.com/e02tKu7x](http://pastebin.com/e02tKu7x)
 *  [jmoseley](https://wordpress.org/support/users/jmoseley/)
 * (@jmoseley)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321609)
 * You should try specifying an absolute width for your wrapper.
    `#wrapper { width:
   960px; margin: 0 auto; }`
 *  Thread Starter [sentientprod](https://wordpress.org/support/users/sentientprod/)
 * (@sentientprod)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321614)
 * tried that before and that didn’t seem to work
 *  [jmoseley](https://wordpress.org/support/users/jmoseley/)
 * (@jmoseley)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321622)
 * What is your url?
 *  [pdxchambers](https://wordpress.org/support/users/pdxchambers/)
 * (@pdxchambers)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321623)
 * > You should try specifying an absolute width for your wrapper.
   >  #wrapper { width:
   > 960px; margin: 0 auto; }
 * I agree… It looks like what is happening is that the `#wrapper` element is set
   to 100% of the containing element which, in this case, is the `<body>` tag. So
   essentially you’ve set it to fill the whole page. Setting `width: 960px;` will
   constrain `#wrapper` and allow it to be centered.
 * In other words, you are being centered… you’re just being centered at 100% of
   the screen.
 *  [pdxchambers](https://wordpress.org/support/users/pdxchambers/)
 * (@pdxchambers)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321626)
 * You know… was just looking at your code… I don’t see where you link your “sentient.
   css” file in the header… am I missing it?
 *  Thread Starter [sentientprod](https://wordpress.org/support/users/sentientprod/)
 * (@sentientprod)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/website-not-centered/#post-2321638)
 * I don’t know where it is going exactly but there’s a menu where you select your
   custom .css file in the theme options via wordpress. My website is [http://www.sentient.mmgtv.org](http://www.sentient.mmgtv.org)
 * Tried editing it to 960px and it seems to work a little but not completely. Still
   see it aligned to the left but not as much.

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/website-not-centered/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/website-not-centered/page/2/?output_format=md)

The topic ‘Website not centered’ is closed to new replies.

 * 20 replies
 * 7 participants
 * Last reply from: [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/website-not-centered/page/2/#post-2321936)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
