• Hey I have been having trouble with the text alignment.
    I set my text on justified and post (it comes out justified) however whenever i post something new my previous post becomes centered. I have tried to edit my previous posts but they still display as centered text.

    Example: http://www.hollywoodtreatment.net/blog/ (the 3 recent posts, the latest post is justified while the other two are centered)

Viewing 2 replies - 1 through 2 (of 2 total)
  • There are two ways to control text alignment: (1) through inline styling in your HTML; (2) through your external stylesheet.

    Setting your text alignment using the WordPress editor is method (1). You click the justify button, and the HTML code for the paragraph changes from <p> to <p style="justify;">. Checking the code for your site, your centered paragraphs have <p style="center;">, which is why they’re centered.

    Rather than going through changing <p style="center;"> to <p style="justify;">, it would be much better to handle your text alignment using method (2). If you have plain <p> tags in your HTML (i.e. no style="anything;"), and add .entry p { text-align: justify; } to your style.css theme file, then all paragraphs in your posts will be justified. Add this line to your stylesheet, switch to code view for your problem posts and delete the style="center" on the centered paragraphs, and your site should behave as you want it to.

    – Tim

    Open the stylesheet and find this;

    #content .post p {
    margin-bottom:15px;
    }

    Try changing it to this;

    #content .post p {
    margin-bottom:15px;
    text-align:justify;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problems with text alignment’ is closed to new replies.