- Mastering CSS
- Rich Finelli
- 169字
- 2021-07-08 09:45:56
Creating a multicolumn layout
Floats were designed to flow text around an image. However, floats are also the most common way of building a multicolumn layout. In this section, we'll look at how to float elements next to each other in order to create a page layout.
So, what we currently have in the HTML in the secondary section are three div tags with a class of column:

The following screenshot illustrates the final site. This is what we're aiming for. We want three equal columns with a small gutter or margin in between:

In our current site, columns are stacked on top of one another. Right now, we have simple rows, so we want to fix that using floats. In our final site, we want to have everything centered in the middle of the page, but right now, all of our content goes from one edge of the browser window to pretty much the opposite edge of the browser window:

Let's fix this by centering our div tags.
- Learning Selenium Testing Tools with Python
- 劍指JVM:虛擬機(jī)實(shí)踐與性能調(diào)優(yōu)
- The React Workshop
- Java深入解析:透析Java本質(zhì)的36個話題
- Monitoring Elasticsearch
- 焊接機(jī)器人系統(tǒng)操作、編程與維護(hù)
- HTML5從入門到精通 (第2版)
- .NET 4.5 Parallel Extensions Cookbook
- 實(shí)戰(zhàn)Java高并發(fā)程序設(shè)計(jì)(第2版)
- Java Web從入門到精通(第2版)
- Practical Predictive Analytics
- Web前端開發(fā)技術(shù):HTML、CSS、JavaScript
- 絕密原型檔案:看看專業(yè)產(chǎn)品經(jīng)理的原型是什么樣
- MySQL數(shù)據(jù)庫應(yīng)用技術(shù)及實(shí)戰(zhàn)
- LabVIEW案例實(shí)戰(zhàn)