WordPress.org

Ready to get started?Download WordPress

Forums

CSS help with Esquire theme: center the blog on page? (4 posts)

  1. mariss
    Member
    Posted 1 year ago #

    I'm using the Esquire theme and would like to center my blog within the page. I've looked around on the various "center my blog on page" threads and haven't found anything that works. Not sure if I'm just inept or if it's just the theme being finicky. If someone could take a look and let me know if I'm missing something, that would be great! To date, here's what I've tried:

    - text-align:center in the body, then text-align:left in the main content area: I haven't been able to figure out where the main content div is located in the CSS, so I end up with all of the text centered or aligned to the right.

    - adding #wrapper and the associated code: this just doesn't do anything.

    So basically the logic of how to do this makes sense to me, I just can't figure out how to do it in my theme. Any help would be much appreciated - thanks!

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    There does not appear to be a way to center it -- without doing quite a bit of recoding of the layout of the page... It would need to have a wrapper div -- coded into the header and footer files -- which it does not have. Text-align is not meant to use for block level elements -- but primarily for text. So it won't work for a whole site.

    Did you add a #wrapper div to the header and footer php files?

  3. mariss
    Member
    Posted 1 year ago #

    Yeah, I had been wondering about why using text-align would work. How much recoding is "quite a bit"? I'm sure I can figure out how to do most stuff, but don't want to rewrite the majority of the theme. How much beyond adding #wrapper divs are we talking about, do you think?

    Thanks!

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Well, certainly CSS for the #wrapper -- which is not hard, though it may take a bit of experimenting to get it right. Aside from that, hard to say -- as it just depends on whether that works in the first go-round. It shouldn't be that major, but some people don't know enough or really don't want to do ANY coding (even CSS). If you're game, great! You don't have anything to lose by trying. One thing is that you would very VERY well advised to create a Child Theme before you start doing any changes to the theme -- otherwise all of the changes you make will be overwritten and lost when you update the theme. And for sure, save a back-up copy of your theme before you do anything!

    I'm guessing that the #wrapper divs would go right below the body tag in the header.php and just above it in the footer.php.

Topic Closed

This topic has been closed to new replies.

About this Topic