Line Spacing In WordPress

linespacing

One of WordPress most useful options is Line spacing. You can easily add extra blank line spaces in most Word processors. You just have to press the “ENTER” key a few times. If you’re a professional, then you can change the formatting to create double spaced line after paragraphs, increase line spacing, etc.

It’s important to know that line spacing is controlled by the WordPress theme you currently use.

When you press “Enter” to add a line break, WordPress visual editor takes it for a new paragraph. This means that it will automatically add double line space since your theme has the styling for it.

So  just go in and press “Enter” after the line and then type something else in the next line.

Simply doing this, based on your theme styling, you must see a clear distinction between paragraphs.

Writing an address

In case you are writing something like an address, then you probably want it to be single spaced instead of double spaced. For that, you need to press SHIFT + ENTER key.

This will tell WordPress that you want to start a new line inside an existing paragraph thus it needs single line spacing instead of double line spacing.

It may happen that even when you add the proper line spacing in the editor, it doesn’t display the way you need it to in your theme. This happens when you need to make CSS changes. CSS is basically like the formatting feature in Microsoft Word.

You should open your theme’s CSS file. Find it by going to Appearance » Editor in your WordPress admin area. You may also use FTP as well if you like.

In your CSS file, you want to look for .post p

This essentially controls the display of paragraphs in your post content. When you find it, you need to add or modify the line-height value. If you do not find the .post p tag, simply create one. The following css will change the line spacing of paragraph content to 1.5em. em is a unit of width for typography. We are using .post class which WordPress automatically adds to the content area of all posts to make sure it only affects posts and not paragraphs used elsewhere.

.post p{line-height: 1.5em;}

Now this only changes the spacing of single spacing and if you want to change the spacing between each paragraph, then you will need to add padding.

.post p {

line-height: 1.5em;

padding-bottom: 15px;

}

Hope this article will help you guys!

Share this!

Post Author: Staff

Leave a Reply

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