
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
How to create a 3-column layout grid with CSS?
To create a 3-column layout grid with CSS, the code is as follows −
Example
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> body { padding: 1%; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } * { box-sizing: border-box; } .left, .right, .center { float: left; width: 33%; color: white; padding: 10px; height: 500px; text-align: center; } .left { background-color: tomato; } .right { background-color: teal; } .center { background-color: rgb(166, 71, 255); } .container:after { clear: both; } </style> </head> <body> <h1 style="text-align: center;">Three Column grid example</h1> <div class="container"> <div class="left"> <h1>Some text on the left</h1> </div> <div class="center"> <h1>Some text in center</h1> </div> <div class="right"> <h1>Some text on the right</h1> </div> </div> </body> </html>
Output
The above code will produce the following output −
- Related Articles
- How to create a 2-column layout grid with CSS?
- How to create a 4-column layout grid with CSS?
- How to create a mixed column layout grid with CSS?
- Create a Column Layout using CSS
- CSS Grid Layout
- How to create a responsive blog layout with CSS?
- Define the width of each column in CSS Grid Layout
- Create three unequal Columns with Bootstrap grid layout
- Create two unequal columns with Bootstrap Grid Layout
- Create Three Equal Columns with Bootstrap grid Layout
- How to create a responsive portfolio gallery grid with CSS?
- How to create a responsive zig zag (alternating) layout with CSS?
- How to create a responsive Image Grid with HTML and CSS?
- How to create a list grid view with CSS and JavaScript?
- How to create an expanding grid with CSS and JavaScript?

Advertisements