How To Create A 3-column Layout Grid With CSS? - Tutorialspoint
Có thể bạn quan tâm
- Home
- Whiteboard
- Online Compilers
- Practice
- Articles
- AI Assistant
- Jobs
- Tools
- Corporate Training
- Courses
- Certifications
- Switch theme
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
To create a 3-column layout grid with CSS, the code is as follows −
Example
Live Demo
<!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 −

AmitDiwan Updated on: 2020-05-12T12:52:25+05:30 3K+ Views
Kickstart Your Career
Get certified by completing the course
Get StartedTừ khóa » Html Div Tag 3 Columns
-
How To Create A Three Column Layout - W3Schools
-
3 Column Layout HTML/CSS - Stack Overflow
-
HTML 3 Column Layout: A Comprehensive And Easy How-To Guide
-
How To Divide Div Into 3 Equal Columns Layout CSS - Dev Practical
-
How To Create A 3-column Layout Grid With CSS? - Studytonight
-
Grid System - Bootstrap
-
CSS · Bootstrap
-
Divide 3 Divs In 3 Columns - HTML CSS CSS Layout
-
How To Create 3 Columns Oin Html Without Css?
-
CSS Layout Techniques | Comm244 Notes
-
How To Create Columns In HTML
-
Basic Concepts Of Grid Layout - CSS: Cascading Style Sheets | MDN
-
How To Create A Responsive 3 Column Layout Using Html And CSS ...
-
3 Column Layouts (Responsive Demos & Example HTML/CSS)