WordPress.org

Support

Support » Themes and Templates » Centering the content area

Centering the content area

  • Hello,

    I would like to center the content area of my theme so I could have same margins on the both sides of the content area. Currently it looks a little bit stupid on high resolution because the right side is empty.

    I have set a background for my site and I made the left sidebar “transparent”. I thought that would be easiest way to hide the original black sidebar. Considering responsiviness it would wise to remove it but that may be too difficult for me.

    Any suggestions how to center the content area of or is too difficult task? You can see my website here.

    Thank you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Sorry for another post but I just noticed my site is currently terrible on mobile devices. Clearly my current plan to fix the sidebar did not work. On a big desktop screen it is still a beauty.

    Andrew Nevins
    Forum moderator

    @anevins

    Have you seen this for centering things: http://www.w3.org/Style/Examples/007/center.en.html ?

    Thanks, Andrew Nevins! Now I have seen that.

    Maybe I was a little bit unclear what I’d like to do with my site. I would like to have equal space on the both sides of the main content area. I don’t know how to achieve this goal with easy solution like this because the width is fixed. If someone knows it, I am more than ready to listen.

    Andrew Nevins
    Forum moderator

    @anevins

    Did you try the “margin: 0 auto” technique discussed in that W3C link?

    Yes and no improve happened. Is it possible though I did not know how to use it properly.

    Andrew Nevins
    Forum moderator

    @anevins

    You need to use that technique instead of the techniques you’re trying at the moment to center it.

    trudehelberg.no
    Member

    @trudehelbergno

    Hello,
    I am wondering about the same thing on my site here.

    I read the W3C link, but in the explaination it does not say “margin: 0 auto” anywhere as described in the post above from Andrew Nevins.
    Is there an easier explaination for this, with some very simple step by step explainations and possibly also some photo shots bacxking this up?

    It would be highly appreciated to find out about this, as I have a very wide screen on my desktop and would like to have the page centered.

    Andrew Nevins
    Forum moderator

    @anevins

    @trudehelberg.no, Sounds like you need the support of a CSS forum: http://csscreator.com where you can learn the basics of CSS (no offence).

    If still you’re not satisfied with the support you receive maybe you should consider hiring someone to support you or do the work for you:
    http://jobs.wordpress.net
    http://directory.codepoet.com

    wolfneo
    Participant

    @noaneo

    Hello,
    this is the default theme, it is not centered, it is stuck to the left, first uqe WordPress has a theme like that, an oversight?
    Authors can test the theme in different screen resolutions the theme here
    http://testsize.com/
    thank you

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Centering the content area’ is closed to new replies.