Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Wordpress "justify" not working

  • 4 uphendule
  • 1 inale nkinga
  • 20 views
  • Igcine ukuphendulwa ngu Najm Us Saqib

more options

I run a blog on WordPress and while editing a blog post I tried to "justify" the paragraph but it did not work. I previously used chrome in which it worked, but in Firefox it seems that its is not working.

Ama-screenshot ananyekiwe

Okulungisiwe ngu Najm Us Saqib

All Replies (4)

more options

When I check both the Block editor and the Classic editor I have choices of Left, Center, and Right alignment. Are those the buttons that are not working for you? I'm attaching a screenshot of the buttons I'm referring to.

Helpful?

more options

I am talking about the block editor and attaching screenshot. The justify feature justifies the sentences in equal length. Other chromium based browser, this works.

Helpful?

more options

Your menu is different than mine. You must be using a plugin to add Justify to it. Maybe it's this one?

https://wordpress.org/plugins/block-options/

When I use that plugin to apply justify to a paragraph, I don't see any difference in the editor, but if I click Preview, then in the preview of the edited page, the paragraph is justified.

In the editor, the paragraphs are styled with

white-space: pre-wrap;

which appears to override or conflict with

text-align: justify;

Here's a basic demo for people who don't have a WordPress site: https://jsfiddle.net/f2bLq95s/

Potential Workaround

You could consider a style hack that would override the white-space rule. The plugin I tested adds "has-text-align-justify" to the list of classes for the paragraph, so a style rule could detect that and force white-space to normal for those paragraphs, allowing them to appear justified in the editor:

.has-text-align-justify {
    white-space: normal !important;
}

That gives the result in the screenshot.

That class name may vary depending on your plugin, and you also may need some guidance on how to apply this rule to your WordPress automatically.

Future Firefox Fix

I found a bug on file for this and updated it with a reference to this thread. Since most developers won't have a WordPress site, I provided some background information as well. There's no need to add any further comments at this time. Since this bug is five years old and does not yet have a priority assigned, you should not hold your breath for a fix in the immediate future.

Helpful?

more options

This is the major problem why people don't prefer using Firefox over chromium browsers. People here at Firefox don't fix problems as soon as they get it. I mean its five years old bug still it is not in their priority list (what a joke). There were lots of problems with Firefox when I started using it in Ubuntu. Even the YouTube live and twitter videos were not playing, I had to fix it myself by installing codecs, meanwhile this is not the case with chromium, I was able to play videos on chromium just out of box. Still thank you for your support.

Helpful?

Buza umbuzo

Kufanele ulogele ukungena ku-akhawunti yakho ukuze uphendule amaphosti. Uyacelwauqale umbuzo omusha, uma ungekabi nayo i-akhawunti namanje.