WordPress: Padded Text Shortcode

This shortcode can be used to display blocks of text with a left/right margin. This pushes the text into the middle of the page/post, and makes it appear thinner than the rest of the content.

You can view an example of this shortcode in this post.

This shortcode will display text pushed into the middle like the example below:

The default margin on the text will be 50 pixels on both sides. This can be changed using the “padding” parameter like this:

This would push the text into the middle of the post/page with 250 pixels of space on the left/right side.

Article tags: center, centre, textbox, margins

Was this article helpful?