Resources     Blog  

  1. Home
  2. WordPress Tutorials
  3. How To Add Single Or Double Line Spacing In WordPress

How To Add Single Or Double Line Spacing In WordPress

In many Word processors, adding additional blank line spaces is easy. You simply have to press ENTER several times. With a bit more technical skill, it is also possible to alter the formatting in order to increase line spacing, create a double-spaced line and more. A lot of this gets frustrating for those who are new to visual editor in WordPress. This is because there isn’t a button for formatting like the one that is found in MS Word. We’re going to tell you all about WordPress line spacing so that you can get the look you want without a lot of hassle.

Before we begin, however, it is important to note that line spacing is ultimately controlled by the WordPress theme that is being used. We’re going to show you how to deal with WordPress line spacing in visual editor and then we’ll show you how to alter line spacing in the theme of your choice in case the results aren’t to your liking.

Creating A Double Line Space

When you add a line break by pressing ENTER, this is considered a new paragraph by WordPress visual editor. Due to this fact, the double line space will be automatically added if your theme has the proper styling for this (and many WordPress themes do). Thus, all you have to do is press ENTER after a line and then you can start typing something new on the next line without taking any additional steps. Based upon the styling of your theme, pressing ENTER will create double line spacing and this will in turn produce a clear distinction between your paragraphs.

Creating A Single Line Space

When writing addresses or anything else that does not require a double line space, the ability to create a single space will come in handy. This can be accomplished by pressing SHIFT + ENTER. This tells WordPress that you are going to begin a new line inside of the same paragraph and it will result in single line spacing rather than a double line space.

Altering Spacing And Line Heights

There are times when using the correct line spacing in visual editor will fail to produce the results you want in your selected theme. In these instances, it will be necessary to make CSS changes. CSS is a lot like the MS Word formatting feature.

This will require you to tweak CSS code a bit, but this is not as challenging as it first seems. Simply open the CSS file for your theme. This can be found by going to the WordPress admin area and accessing the Appearance » Editor. If you prefer, you can also use FTP.

Look for .post p in your CSS file. This controls how paragraphs are displayed in the content that you post. After you have located this, you should change or add the line-height value. If the .post p tag proves impossible to find, create one on your own.

post p{line-height: 1.5em;}

As per the CSS rule above, the line spacing for the paragraph content will be changed to 1.5em. An EM is a unit of width that is used for typography. This can be done in .post class, which is added automatically to the content area of every post by WordPress so that it will only affect posts rather than affecting paragraphs that have been used in other places.

This, however, will just change the spacing for single spacing. If you need to alter double spacing or the spacing between all paragraphs, then padding will have to be added. When doing so, you can use values that are best in line with your needs.

Author: Kaumil Patel

Kaumil Patel is the Chief Operating Officer of GreenGeeks and has over 13 years of experience in the web hosting industry working for and owning web hosting companies. Kaumil’s expertise is in marketing, business development, operations, acquisitions and mergers.

Was this article helpful?

Related Articles

Leave a Comment

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.