Forums

How to center my theme (7 posts)

  1. alia828
    Member
    Posted 1 year ago #

    I downloaded a theme which looked like it was centered in the preview, but when i applied it it is left aligned... "text-align:center;" is included in the body of the style.css file which i thought would center it, but apparantly does not....any help is greatly appreciated!

  2. Darran
    Member
    Posted 1 year ago #

    You can use this CSS property for your theme's wrapper

    margin: 0 auto 0 auto;

  3. alia828
    Member
    Posted 1 year ago #

    that css property is already there....still not centered

  4. drewactual
    Member
    Posted 1 year ago #

    no clue on the structure of your page #'s ... a link would be helpful :-)

    basically what Darran said is true. there are a couple ways to go about it, and text-align plays a role in some....

    the manner I use most the time is by limiting the width of a division, such as #wrapper in classic theme... if you define a width and then define margin on the sides it usually works just fine... example follows:

    #wrapper
    { width: 90%; margin-left:auto; margin-right:auto;}

    or, you can simply do this:

    body */add this to it or replace if previously defined
    {width: 90%; margin-left:auto; margin-right:auto;}

  5. alia828
    Member
    Posted 1 year ago #

    well i dont know what the problem is.. i tried your suggestions drewactual and stiill is not centered..i am using the 'loopy blue' theme ( i just changed some colors around and put a different header) ..the link for the theme is http://themes.wordpress.net/columns/2-columns/4357/loopy-blue-10/

  6. whistler2020
    Member
    Posted 1 year ago #

    and the link to your site?

  7. drewactual
    Member
    Posted 1 year ago #

    yup... going to need that link if we are going to help you anymore!

    I am amazed centering the body doesn't work.... there is something deliberately there NOT allowing centering if that doesn't work.

    while you are composing a post with your link in it, ;-) try adding this to your css, make it the LAST three lines in your BODY declaration, matter of fact, just copy and paste it to the end of your css file instead- call it an experiment.

    BODY {width:800px; margin-left:auto; margin-right:auto;}

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.