Space

Sometimes you just want to add vertical space underneath text, before an image or wherever, without having to faff around in CSS. With the [space] shortcode you can easily do this. There is only one parameter for this shortcode.

[space height="20px"]

Parameter options:

height = how much vertical space you want to add

If you don’t specify one of the parameters then it’ll use the default ones as above.


Example 1

The default amount of space (20px) will be added directly after this line of text and before the image beneath.

[space]

<img src="https://duncanarrow.com/wp-content/uploads/2019/07/hello-150x150.jpg" alt="" class="alignnone size-thumbnail wp-image-3482" />

The default amount of space (20px) will be added directly after this line of text and before the image beneath.


Example 2

In this example, 100px of space is added after this line of text and before the image beneath.

[space height="100px"]

<img src="https://duncanarrow.com/wp-content/uploads/2019/07/hello-150x150.jpg" alt="" class="alignnone size-thumbnail wp-image-3482" />

In this example, 100px of space is added after this line of text and before the image beneath.


Example 3

In this example, 50px of space is added after this line of text and before the heading underneath.

[space height="50px"]

<h2>Space added above</h2>

You can see the space has been added above the heading. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla orci quam, venenatis vel ante a, luctus semper elit. Morbi cursus iaculis quam et faucibus.

In this example, 50px of space is added after this line of text and before the heading underneath.

Space added above

You can see the space has been added above the heading. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla orci quam, venenatis vel ante a, luctus semper elit. Morbi cursus iaculis quam et faucibus.

© 2022 Duncan Arrow Limited
  Website by duncanarrow.com