How To Create A Three Column Layout - W3Schools
Có thể bạn quan tâm
Learn how to create a 3-column layout grid with CSS.
Column 1
Some text..
Column 2
Some text..
Column 3
Some text..
Try it Yourself »
How To Create a Three Column Layout
Step 1) Add HTML:
Example
<div class="row"> <div class="column"></div> <div class="column"></div> <div class="column"></div></div>Step 2) Add CSS:
In this example, we will create three equal columns:
Example
.column { float: left; width: 33.33%;}/* Clear floats after the columns */.row:after { content: ""; display: table; clear: both;} Try it Yourself »In this example, we will create three unequal columns:
Example
.column { float: left;}.left, .right { width: 25%; }.middle { width: 50%;} Try it Yourself »In this example, we will create a responsive three column layout:
Example
/* Responsive layout - when the screen is less than 600px wide, make the three columns stack on top of each other instead of next to each other */@media screen and (max-width: 600px) { .column { width: 100%; }} Try it Yourself »Tip: Go to our CSS Website Layout Tutorial to learn more about website layouts.
Tip: Go to our CSS Responsive Web Design Tutorial to learn more about responsive web design and grids.
❮ Previous Next ❯ ★ +1 Sign in to track progressTừ khóa » Html Div Float 3 Columns
-
How To Float 3 Divs Side By Side Using CSS? - Stack Overflow
-
How To Float Three Div Side By Side Using CSS? - GeeksforGeeks
-
3 Ways To Display Two Divs Side By Side (float, Flexbox, CSS Grid)
-
Use CSS Floats To Create A Three-column Page Layout | TechRepublic
-
How To Use Float And Columns To Lay Out Content With CSS
-
CSS Layout Techniques With Floats | Comm 328
-
Arrange 2, 3 Or Many DIVs Side By Side With CSS Float - TechWelkin
-
Float - CSS: Cascading Style Sheets - MDN Web Docs
-
Three Columns: All Floating From Left - HTML / CSS
-
Use The CSS Float Property To Create Columns - Level Up Coding
-
Columns · Bootstrap V5.0
-
CSS · Bootstrap
-
Positioning Content - Learn To Code HTML & CSS - Shay Howe
-
Css Column Structure Using Floats