0 votes
83 views
in HTML by (2.2k points)
edited
How do you create a 3-column card layout using HTML and CSS?

1 Answer

0 votes
by (98.9k points)
selected by
 
Best answer
<div class="card-container">
  <div class="card">
    <!-- Card content for column 1 -->
  </div>
  <div class="card">
    <!-- Card content for column 2 -->
  </div>
  <div class="card">
    <!-- Card content for column 3 -->
  </div>
</div>

 

.card-container {
  display: flex;
  justify-content: space-between;
}

.card {
  width: calc(33.33% - 20px);
  background-color: #f0f0f0;
  border-radius: 5px;
  padding: 20px;
  border:1px solid black;
  margin:2px;
}


See the Pen column card by Mr Ram (@mrram) on CodePen.

Related questions

0 votes
1 answer 93 views
0 votes
1 answer 131 views
0 votes
1 answer 92 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 92 views
0 votes
1 answer 62 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 59 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

535 users

...