Viewing 11 replies - 1 through 11 (of 11 total)
  • Hey there spanishmummy,

    You should be able to do this with some custom CSS. Please try adding the following CSS code in the style.css file of your child theme or add it in your site using the following plugin:

    https://www.ads-software.com/plugins/simple-custom-css

    .single .entry-content {
      text-align: justify;
    }

    This will justify the text on your single post pages. If the code doesn’t work please keep it added and let me know so I can take a look ??

    Cheers,
    Bojan

    Thread Starter spanishmummy

    (@spanishmummy)

    Thanks. Will try that

    Please let me know how that goes ??

    Cheers,
    Bojan

    nandiniii

    (@nandiniii)

    Hi. I have tried the above code but it doesn’t work for me. I have imported by blog from BlogSpot and all the text in imported blogs is aligned to the left. Though the text of new blogs on WordPress is properly aligned as justify but there is a problem with all the earlier posts imported from BlogSpot. Can you please tell its resolution?

    Hey there nandiniii,

    Generally you’d want to open a new thread as this one is pretty old and so we don’t spam the thread opener but since you already posted here I’ll respond as well.

    Can you please post links to those pots so I can take a look? Please add links to where this works and where it doesn’t so I can see where the difference is coming from.

    Best regards,
    Bojan

    nandiniii

    (@nandiniii)

    hi. Please find the link below where the text is justified.

    https://perkymegs.com/2016/02/stunning-silver-jewellery-shopping-at-chandni-chowk/

    And the link below where the text is not justified and I think it’s also aligned left and not center.

    https://perkymegs.com/2015/12/my-november-jewellery-shopping-hau/

    Hey again,

    Thanks for the links, I’ve checked your site and it appears that text of those posts has a wrapper that has text alight left which is causing this. I’m not sure where exactly this is coming from but you should be able to override it with the following CSS code:

    .MsoNormal {
        text-align: justify;
    }

    Hope this helps ??

    Cheers,
    Bojan

    nandiniii

    (@nandiniii)

    Hi Thanks for helping out. The code is working for all the old posts but for any new post created on wordpress, the text is not aligned justified. You can check the latest post. Also the code is not working for mobile site for any post. On mobile all the posts are aligned left and not justified.

    Hey there nandiniii,

    The reason this doesn’t work on mobile screens is because CSS for text justify is placed in media query which works only on larger resolutions. You can override that by adding the following CSS:

    .single .entry-content {
        text-align: justify;
    }

    With regards to your latest posts everything seems fine to me, see screenshot https://screencast.com/t/mRjZWYwIZk.

    In case I missed something or this is not your latest post please post link to that post so I can take a look.

    Cheers,
    Bojan – WPMU DEV

    nandiniii

    (@nandiniii)

    Hi. Thank you so much. It worked perfectly for me. Now all my posts are aligned justify. Thanks again for your help!

    Glad I could help ??

    Cheers,
    Bojan

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to justify text’ is closed to new replies.