I am currently working on designing a website template, and I have encountered an issue with positioning three individual columns that contain blocks of content. My objective is to have the first block of content in each column start at the top of their respective positions.
Let me clarify further - I aim for all content blocks in each column to align at the same starting line and extend downwards as needed. However, presently only the middle column's middle content block starts at the top line, causing the other two columns to align with its bottom line.
.main {
display: block;
position: relative;
width: 1181px;
margin: 0 auto;
padding: 0 auto;
}
.col-one,
.col-two,
.col-three {
display: inline-block;
position: relative;
margin-top: 50px;
}
.col-block-one,
.col-block-two,
.col-block-three {
display: block;
position: relative;
background-color: white;
width: 360px;
margin-left: 15px;
margin-right: 15px;
}
.col-one-title,
.col-two-title,
.col-three-title {
display: block;
position: relative;
font-size: 24px;
font-weight: 500;
padding: 24px;
}
.col-one-content,
.col-two-content,
.col-three-content {
display: block;
position: relative;
font-size: 18px;
padding-right: 24px;
padding-left: 24px;
padding-bottom: 24px;
}
<div class="main">
<div class="col-one">
<div class="col-block-one">
<p class="col-one-title">HTML Introduction, What is HTML</p>
<p class="col-one-content">HTML is a Hypertext Markup Language, It's a Predominant set of Markup tags which used to create design of web pages.</p>
</div>
<!-- end of col-block-one -->
</div>
<!-- end of col-one -->
<div class="col-two">
<div class="col-block-two">
<p class="col-two-title">HTML Introduction, What is HTML</p>
<p class="col-two-content">HTML is a Hypertext Markup Language, It's a Predominant set of Markup tags which used to create design of web pages. HTML is a Hypertext Markup Language, It's a Predominant set of Markup tags which used to create design of web pages. HTML is a Hypertext
Markup Language, It's a Predominant set of Markup tags which used to create design of web pages.</p>
</div>
<!-- end of col-block-two -->
</div>
<!-- end of col-two -->
<div class="col-three">
<div class="col-block-three">
<p class="col-three-title">HTML Introduction, What is HTML</p>
<p class="col-three-content">HTML is a Hypertext Markup Language, It's a Predominant set of Markup tags which used to create design of web pages.</p>
</div>
<!-- end of col-block-three -->
</div>
<!-- end of col-three -->
</div>
<!-- end of main -->