1
2
3
4
5
6
14 Feb 2022 — Updated 20 Mar 2023
These layouts all use the Responsive Columns layout system.
Download All Demos
(responsive-columns.zip 155k)
In this article, I will cover the various types of six-column layouts and show how easy they are to create with the Responsive Columns layout system. You can download all of these demos with the handy link above.
Let's get started.
In this six-column layout, the columns stay side-by-side even on small mobile screens.
1
2
3
4
5
6
<r-c join>
<c1-6 class="red">
<!-- 1 -->
</c1-6>
<c1-6 class="orange">
<!-- 2 -->
</c1-6>
<c1-6 class="yellow">
<!-- 3 -->
</c1-6>
<c1-6 class="green">
<!-- 4 -->
</c1-6>
<c1-6 class="aqua">
<!-- 5 -->
</c1-6>
<c1-6 class="blue">
<!-- 6 -->
</c1-6>
</r-c>
We add the 'join' attribute to remove all gutters, join the columns together, and add padding. Learn more about gutter mode and join mode in the documentation.
.red {
background:#f97171;
}
.orange {
background:#f99e50;
}
.yellow {
background:#f5d55f;
}
.green {
background:#c5ed77;
}
.aqua {
background:#72f1d4;
}
.blue {
background:#72c2f1;
}
We only need CSS for the background colors, all the structural CSS is handled by the Responsive Columns system.
In this six-column layout, the columns are stacked on mobile, two columns wide on tablet portrait, three columns wide on tablet landscape, and six columns wide on desktop.
1
2
3
4
5
6
<r-c join sm1-2 md1-3 lg1-6>
<c1-1 class="red">
<!-- 1 -->
</c1-1>
<c1-1 class="orange">
<!-- 2 -->
</c1-1>
<c1-1 class="yellow">
<!-- 3 -->
</c1-1>
<c1-1 class="green">
<!-- 4 -->
</c1-1>
<c1-1 class="aqua">
<!-- 5 -->
</c1-1>
<c1-1 class="blue">
<!-- 6 -->
</c1-1>
</r-c>
Add as many columns as you like and they will follow the same number of columns per breakpoint.
.red {
background:#f97171;
}
.orange {
background:#f99e50;
}
.yellow {
background:#f5d55f;
}
.green {
background:#c5ed77;
}
.blue {
background:#72c2f1;
}
In this six-column layout, the columns are separated by gutters. The columns stack vertically on mobile, are two columns wide on tablet portrait, three columns wide on tablet landscape, and six columns wide on desktop.
First column. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque iaculis lectus vel metus pellentesque, eu venenatis est euismod.
Second column. Nulla eget ligula quis purus molestie malesuada non at nibh. Proin a magna ac velit iaculis pretium. Fusce vitae sollicitudin sapien.
Third column. Quisque iaculis lectus vel metus pellentesque, eu venenatis est euismod. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Fourth column. Proin a magna ac velit iaculis pretium. Nulla eget ligula quis purus molestie malesuada non at nibh. Fusce vitae sollicitudin sapien.
Fifth column. Nulla eget ligula quis purus molestie malesuada non at nibh. Proin a magna ac velit iaculis pretium. Fusce vitae sollicitudin sapien.
Sixth column. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque iaculis lectus vel metus pellentesque, eu venenatis est euismod.
<r-c sm1-2 md1-3 lg1-6>
<c1-1>
<!-- first column -->
</c1-1>
<c1-1>
<!-- second column -->
</c1-1>
<c1-1>
<!-- third column -->
</c1-1>
<c1-1>
<!-- fourth column -->
</c1-1>
<c1-1>
<!-- fifth column -->
</c1-1>
<c1-1>
<!-- sixth column -->
</c1-1>
</r-c>
The Responsive Columns layout system uses tiny custom HTML tags that make coding responsive layouts a breeze. You don't need to know any complicated CSS. See the documentation for more details on the custom HTML tags.
No CSS is required for this layout because all the work is done by the Responsive Columns system.
This six-column layout uses semantic HTML5 tags. The columns stack on mobile, are two wide on tablet portrait, three columns wide on tablet landscape, and six columns wide on desktop.
1
2
3
4
5
6
<article data-r-c data-join data-sm1-2 data-md1-3 data-lg1-6>
<section class="red">
<!-- 1 -->
</section>
<section class="orange">
<!-- 2 -->
</section>
<section class="yellow">
<!-- 3 -->
</section>
<section class="green">
<!-- 4 -->
</section>
<section class="aqua">
<!-- 5 -->
</section>
<section class="blue">
<!-- 6 -->
</section>
</article>
The Responsive Columns system is compatible with semantic tags. Full details here: How to use semantic HTML tags with responsive columns.
.red {
background:#f97171;
}
.orange {
background:#f99e50;
}
.yellow {
background:#f5d55f;
}
.green {
background:#c5ed77;
}
.aqua {
background:#72f1d4;
}
.blue {
background:#72c2f1;
}
Responsive Columns works in all modern browsers, plus all old browsers that support Flexbox:
If you need to achieve 6 equal-height columns in old browsers that don't support flexbox CSS (back to IE 5.5), you can use my nested equal-height columns method.
You can easily change the widths of your columns and change how they respond to different screen sizes.
Refer to the Responsive Columns Documentation to see how easy it is to create responsive layouts to your exact requirements.
Responsive Columns:
Responsive Attributes:
Equal-Height Columns
Bottom Footer
Holy Grail 3-Column Responsive Layout
How to add CSS to HTML
ID vs Class: Which CSS Selector Should You Use?
© 1994 — 2024 Matthew James Taylor