Get a blank line after div by simply leaving an empty line in the editor

enter image description here

I’m styling a div object so that its content behaves like a normal text.

As first thing I set its line height as the default line-height of a line in a paragraph.

I got this by adding the following css code

.myclass div {
    margin: -1.43em 0 -0.93em 0;
}

In this way, by writing this in the WP editor

badp
<div class=myclass>badp</div>
badp

the vertical spacing is changed as shown in the image

Next I’d like that an empty line after the div in the editor will correspond to a blank line in the webpage. That is, I’d like that by writing

badp
<div class=myclass>badp</div>

badp

the vertical spacing will be changed as shown in the image

I know that this can be obtained by inserting   in the empty line, but is it possibile to achieve it by simply leaving an empty line?

Read more here:: Get a blank line after div by simply leaving an empty line in the editor

Leave a Reply

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