How to create three column layout equally using HTML and CSS


How to create three column layout equally using HTML and CSS

In this tutorial, we will learn to create three column layout equally using HTML and CSS. In order to do this, we have to understand the following CSS properties.

Also Read, How to auto calculate the sum of input values using Jquery or Javascript

CSS properties to create three column layout equally

  • Float
  • Width
  • Clear
  • Display
  • after Selector

Complete Code:-

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
  box-sizing: border-box;
}
.container{
  width:60%;
}

/* Create three equal columns that floats next to each other */
.column {
  float: left;
  width: 33.33%;
  padding: 10px;
  height: 150px; /* Should be removed. Only for demonstration */
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}
</style>
</head>
<body>
<h2>Three Columns Equally</h2>
<div class="container">
  <div class="row">
    <div class="column" style="background-color: #aaa;">
      <h2>First Column</h2>
      <p>This is the first column</p>
    </div>
    <div class="column" style="background-color: #aaa;">
      <h2>Second Column</h2>
      <p>This is the second column</p>
    </div>
    <div class="column" style="background-color: #aaa;">
      <h2>Third Column</h2>
      <p>This is the third column</p>
    </div>
  </div>
</div>
</body>
</html>

Illustration of the example with above CSS properties

Float:-

Float property defines how an element should float i.e. on the left side or on the right side. In this example, we will use the left property.

Width:-

It is used to define the width of each element. It may be columns, paragraphs etc. In this example, we will use 33.33%.

Clear:-

Clear property decides to float on the sides of the floating elements. To use the clear property, we have to use the float property. If float property is set to left then clear property should be set to left.

Display:-

Display property defines how the floating elements should be displayed. In this example we will use the table format. In this example we are using the table property as we show in the form of table.

Also read, How to calculate JavaScript difference between two dates in days

Conclusion:- I hope this tutorial will help you to create an HTML layout equally. If you have any doubt then please comment below. To know more about HTML and CSS Click Here


2 thoughts on “How to create three column layout equally using HTML and CSS”

  1. Hey There. I found your blog using msn. This is a
    really well written article. I’ll make sure to bookmark it and return to read
    more of your useful information. Thanks for the post. I’ll definitely return.

    Reply

Leave a Comment

KUPU178

THOR311

THOR311

RATU311

HOKI311

KUPU178

KUPU178

RATU311

THOR311 TOTO4D

KUPU178

Live Casino Roullate

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

KUPU178

THOR311

THOR311

THOR311

RATU311

CERI188

DAFTAR KUPU178

LINK DAFTAR CERI188

CERI188

sabung ayam online

APK KUPU178

KUPU178

CERI188

CERI188

RATU311

KUPU178

THOR311 DOMINO QQ

judi bola online

Mix Parlay

CERI188

CERI188

CERI188

KUPU178

RATU311

live casino online

RATU311

Mix Parlay

Sabung Ayam Online

Slot PG Soft

CERI188

RATU311

RATU311

RATU311

RATU311

CERI188

THOR311

CERI188

THOR311

RATU311

THOR311

Game Thor311

THOR311

HOKI311

live casino

sv388

HOKI311

HOKI311

slot mahjong

Thor311 Alternatif

RATU311

HOKI311

HOKI311

HOKI311

HOKI311

CERI188

THOR311 RESMI

THOR311 AKSES

THOR311

THOR311 RTP

RATU311

RATU311

THOR311

parlay

HOKI311

RATU311

THOR311

Ceri188

Thor311 Game Online

Thor311 Aplikasi

LINK CERI188

RATU311 NONTON BOLA

RATU311

CERI188 Link RTP LIVE

THOR311

Thor311 Live Casino

CERI188

akses VIP THOR311

THOR311

link daftar THOR311

THOR311

situs thor311

THOR311 LOGIN

THOR311

RATU311

HOKI311 Link SABUNG AYAM RESMI

HOKI311 Link QRIS EWALLET

RATU311

LINK CERI188

parlay

HOKI311 Link RTP Gacor

THOR311

RATU311

HOKI311 Link Apk Resmi

RATU311

RATU311

CERI188

CERI188 Situs Spaceman Terbaik 2026

KUPU178 Link Daftar

CERI188

CERI188

CERI188

CERI188

CERI188

HOKI311

THOR311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

CERI188 Live Casino

HOKI311 Lapak Arena Slot

RATU311 judi bola

CERI188 Live Casino

HOKI311 Link Spaceman Online

HOKI311 Link Daftar Resmi

CERI188 Toto SGP Online

KUPU178

KUPU178

KUPU178

KUPU178

HOKI311 TEMBAK IKAN ONLINE

RATU311

CERI188 PANDUAN MAXWIN SLOT ONLINE

RATU311

RATU311

KUPU178

HOKI311 Link Login Alternatif

HOKI311 Live Casino Online

HOKI311 Situs Slot Gacor

THOR311

THOR311

situs judi bola

Ceri188 Game Online

CERI188

link login CERI188

link login CERI188

CERI188

link login CERI188

link login CERI188

link daftar CERI188

THOR311

HOKI311

HOKI311

CERI188

CERI188

CERI188

parlay

THOR311

RATU311

RATU311

HOKI311

HOKI311

parlay

HOKI311

RATU311

THOR311

KUPU178

HOKI311

KUPU178

KUPU178

KUPU178

HOKI311

parlay

slot gacor

kupu178 link alternatif

kupu178 slot

kupu178 daftar

kupu178 login

link daftar kupu178

judi bola

HOKI311

RATU311

link alternatif RATU311

Link daftar RATU311

link login RATU311

RATU311

RATU311

RATU311

RATU311

KUPU178

KUPU178

THOR311

KUPU178

KUPU178

KUPU178

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

THOR311

RATU311

KUPU178

KUPU178

HOKI311

THOR311

KUPU178

THOR311

THOR311

slot thailand

judi bola

THOR311

THOR311

KUPU178

THOR311

situs bola

THOR311

slot gacor

slot gacor

yakuza303

slot gacor

unobet77

slot gacor

slot gacor

RATU311

parlay

parlay

slot gacor

mix parlay

judi bola

judi bola

mix parlay

parlay

judi bola

sv388

judi bola

judi bola

judi bola

parlay

THOR311