0
  <div class="row">
  <div>      

    <h2>{{ _('Why this matters') }}</h2>

    <div class="markdown">{{ task.why_this_matters_html }}</div>
  </div>
  </div>

I want a blank line before the heading "Why this matters". I used < br >. But have read that
is not a good practice to be done. Any help would be appreciated.

Jicksy John
  • 169
  • 1
  • 2
  • 13

3 Answers3

5

Referring to pianoman99's answer, I would use the actual line height and an em value.

h2 {
  margin-top: 1.2em;
}

That way it scales better with the text and the space is nearly a line, according to the MDN page for line-height

But of course you may want to change the values based on your project.

Felix
  • 541
  • 1
  • 4
  • 14
2

div.row h2{
margin-top: 10px;
}

You can be more spesific and write it like this to make the css code affect only this h2 header not all header if you have more than one in your page

div#ro
1

Use this CSS:

h2
{
margin-top:10px;
}

Is that what you are looking for?

Here's what it would look like:

 div.row h2{
    margin-top: 20px;
    }
<div class="row">
  <div>      

<h2>{{ _('Why this matters') }}</h2>

<div class="markdown">{{ task.why_this_matters_html }}</div>
  </div>
  </div>
Ian Hazzard
  • 7,661
  • 7
  • 34
  • 60