WordPress.org

Ready to get started?Download WordPress

Forums

How do I center align my entire blog? (3 posts)

  1. eseru
    Member
    Posted 5 years ago #

    the header, footer and index, i mean.
    I know this is kind of simple but I can't figure out the default theme structure.
    please help.

  2. krembo99
    Member
    Posted 5 years ago #

    The simplest way is this :
    add a new DIV to your layout , called container, like so :

    <body>
      <div id="container">
        ...entire layout goes here...
      </div>
    </body>

    Than add this to CSS :

    body {
      text-align: center;
      }
    #container {
      margin: 0 auto;
      width: PutNumberOfPixels px;
      text-align: left;
      }

    or this :

    body {
      text-align: center;
      }
    #container {
      margin-left: 15%;
      margin-right: 15%;
      text-align: left;
      }
  3. rhymes
    Member
    Posted 5 years ago #

    Where do you put both of these codes? Does the first go in the php page or somewhere in the Theme Options?

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic