Archived topic
Force even paragraphs
7 replies · Started by troyw on February 28, 2022
Hi team,
I am trying to make some paragraphs appear evenly in their blocks. Obviously if I set the margin left, the right of the line is uneven. If I set the margin to the right, the left is uneven. If I set it to central, both left and right are even. As with an email or in MS Word, I want to force the lines and paragraphs to be even on both sides, by increasing gaps between words.
Any ideas how to achieve this?
Thanks
Hi Troyw,
Are you referring to Justifying the texts? If so here is a CSS code you may try for these specific Paragraph Blocks on this specific page:
.page-id-4747 .content-area .site-main .gb-inside-container > p {
text-align: justify;
}
If you’re referring to something else, can you provide a screenshot of an example to have a better understanding.
Kindly let us know. :)
Hey Fernando,
That worked perfectly, thanks.
If I want to do the same thing to the paragraphs in Media Text Blocks, how would I adapts the above CSS?
I tried this CSS but it didn't work;
.page-id-5339 .content-area .site-main .gb-media-text > p {
text-align: justify;
}
Thanks
You’re welcome Troyw!
Can you provide the link to the specific page in question? I’ll try to check from my end what's causing it not to work.
Hope to hear from you soon! :)
Please see here
I see. It seems that the reason why your CSS code isn’t working is because there is no gb-media-text class in this page, and the class of the div holding the Paragraph blocks are wp-block-media-text__content.
Here is a code you may try instead:
.page-id-5339 .content-area .site-main .wp-block-media-text__content > p {
text-align: justify;
}
Moreover, you may create a reusable code like this and you can just add a specific class to your Paragraph blocks to make them justified:
.make-justified {
text-align: justify !important;
}
The class name I specified is make-justified. Kindly use what works for you. :)
See: https://share.getcloudapp.com/DOum56oP
Hope this clarifies! :)
That's perfect, thanks Fernando.
You’re welcome Troyw! Glad that works! Feel free to reach out anytime if you’ll need assistance with anything else. :)