HTML Basic 3 Column Layout using Flexbox
A simple HTML layout with a header, main content area, and footer using CSS for styling.
HTML Structure
1 | <div class="container"> |
3 Column Layout using Flexbox
1 | * { |
Here container is the main wrapper of the layout. It uses column flexbox to stack the header, main content, and footer vertically.
The main content area is also a flex container that allows the aside and content sections to be displayed side by side.
Responsive Design
To make the layout responsive, you can use media queries to adjust the styles based on the screen size. For example, you can stack the aside and content sections vertically on smaller screens:
1 | @media (max-width: 768px) { |
Here’s a live example of the layout: