Darcy Paterson Blog Improve your website’s design with one line of code

wordpress logo

Improve your website’s design with one line of code

By on November 26th, 2020

If you or your company use a Content Management System (CMS) like WordPress you’ve probably written a blog post. When writing it you’ve noticed that adding a new paragraph in the WYSIWYG editor is easy. It’s so easy that paragraphs are often added by accident.

When this happens a gap appears between text blocks. To demonstrate, you’ll notice that there is gap between this paragraph and the one above it.

Now compare the space between those two paragraphs and the space between this one and the one above it. Notice the difference?

There’s a simple line of code you can use to fix this. It’s so simple, anyone can do it. Even if you have no coding experience at all, try adding this line of code to your website.

p:empty {display: none;}

In WordPress, the way to do it is by going into your Admin area. Once there, go to Appearance > Customize.

WordPress customizer

After that you’ll see a menu item called “Additional CSS.” That’s where you paste the code. Once done, simply save and exit.

Now your WordPress website will automatically remove empty paragraph blocks. The site design is improved by making it easier to read.