Genx Blog

A Japanese web3 beatmaker. I make music and art.

How to wrap text within a code block without overflowing it

prakasit khuansuwan m3JQf T9hU unsplash scaled
Genx Avatar
Share This:

To wrap the text in a code block to fit the screen width, enter the following in CSS.

.wp-block-code code {
white-space: pre-wrap;
overflow-wrap: anywhere;
}

Last Updated:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

14 − 5 =