Forums › Forums › General Questions › Content toggle – justify text
Tagged: content-toggle, css
-
Content toggle – justify text
-
Hi,
I’m looking for a way to justify the text in the content of a toggle panel. I can do it using a “classic” block, but I was wondering if there was an easy way to add a CSS to use the default paragraph from the content toggle (just starting typing instead of having to choose a specific block.
Thanks you for your feedback !
Kind regards,
Nicolas
-
Hi @nicover ! Here’s some custom CSS you can use for justifying the paragraph texts inside all content toggle instances. Please keep in mind that by using this, you won’t be able to use WordPress’ built-in alignment buttons to realign paragraphs inside the content toggle block, and you’ll need to get the element ID corresponding to the target content toggle block to prevent instances other than the intended targets from having their paragraphs realigned.
.wp-block-ub-content-toggle-accordion-content-wrap > p {
text-align: justify;
}Please let us know how it goes.