Nearby lessons
13 of 15CSS: Multi-Column Layout
📌 What is CSS Multi-Column Layout?
The Multi-Column Layout in CSS allows content to be divided into multiple columns, similar to how text flows in newspapers or magazines. It uses properties like column-count, column-width, column-gap, column-rule, etc., to control layout behavior.
1️⃣ Basic Multi-Column using column-count
column-count specifies the number of columns an element should be divided into.
Example02
2️⃣ Using column-width
column-width sets an ideal width for the columns. The browser will then fit as many columns as it can without exceeding the width.
Example03
3️⃣ column-gap for spacing
column-gap sets the space between columns.
Example04
4️⃣ column-rule for line between columns
column-rule adds a line between columns with defined width, style, and color.
Example05
5️⃣ column-span for element spanning columns
column-span allows an element like a heading to span across all columns.
Example06
🧠 Test Your Knowledge
3 QuestionsProgress: 0 / 3