Tuesday, 9 of March of 2010

WordPress: How to Add Blank Lines

One of the drawback in using a template website system like WordPress is that you often run into limitations as soon as you want to do anything ‘out of the box‘.

While you might think that a simple task like adding a blank line after a paragraph or an image should be easily done, unfortunately, it’s just not the case.

There are two ways around this. Neither are great. (If you know of another solution, let me know!)

HTML Mode Solution:

Add the following code whenever you want an extra line feed:

<div style="height:25px;"></div>

The height of 25px is approximately 2 line feeds. Adjust it to any number you like.  When you add this code in HTML mode, stay in HTML mode, then Publish your changes. If you switch to Visual mode, the code will disappear.

Visual Mode Solution:

Add a  horizontal image the same colour as your post background where you want the blank space to appear. (In this case, the image is white.)

Below this line there is a white image 25  pixels high with no borders:
spacer_H_25

The above image is causing this line to appear twice as far down as it normally would.

For even more space, here is an image 100 Pixels High:

spacer_H_100

Feel free to use these ’spacer’ images in your posts.

For the 25 pixel spacer, enter the following URL in the Image URL box after you select the add an image icon and the From URL tab:

http://www.smvancouver.ca/wp-content/uploads/2009/11/spacer_H_25.jpg

Use this URL for the 100 pixel spacer:

http://www.smvancouver.ca/wp-content/uploads/2009/11/spacer_H_100.jpg

Once the spacers are in your post, they can  be made  thinner by clicking on the image, selecting the mountain icon to edit the image, and selecting either 60%, 70%, 80%, or 90%.  Then click on the Update button at the bottom left.


Leave a comment