A
A
Alexander Volkov2017-05-31 08:15:45
css
Alexander Volkov, 2017-05-31 08:15:45

How to place a paragraph under a heading?

I need the paragraphs to be under the headings, how to implement this?
434274a936724c3b83bf2c966bcdbd42.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dummyman, 2017-05-31
@hopel19

The text under the heading

display:block; 
clear:both;

A
A person from Kazakhstan, 2017-05-31
@LenovoId

I applied css table

the code
<div clas="wrapper">
<div class="row">
  <div class="post">
  <h3>Lorem Ipsum 1</h3>
  <p>
    Curabitur aliquet quam id dui posuere blandit. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec rutrum congue leo eget malesuada.
  </p>
  </div>
  <div class="post">
   <h3>Lorem ipsum 2</h3>
  <p>
    Curabitur aliquet quam id dui posuere blandit. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec rutrum congue leo eget malesuada.
  </p>
  </div>
  <div class="post">
  <h3>Lorem ipsum 3</h3>
  <p>
    Curabitur aliquet quam id dui posuere blandit. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec rutrum congue leo eget malesuada.
  </p>
  </div>
  </div>
</div>

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}
.clear,.clear:after,.clear:before{
  content:"";
  display:block;
  clear:both;
}
.wrapper{
  display:table;
  width:90%;
  margin:auto;
}
.row{
  display:table-row;
}
.post{
  display:table-cell;
  width:1000px;
}
.post h3{
  padding-left:8px;
}
.post p{
  padding:8px;
  margin:auto;
  text-align:justify;
}

This is DEMO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question