TAILIEUCHUNG - beginning html xhtml css and javascript phần 6

Nhìn lại các bảng, chúng ta vẫn cần thêm Máng 1, 2, và 3 cột 1, 2, và 3 bằng cách sử dụng tài sản với giá trị là 2% margin-left. Chúng tôi không thực sự cần thêm Gutter 4 vào thiết kế bởi vì chúng tôi đã cho phép thêm một không gian nhỏ ở bên phải của thiết kế. | Chapter 9 Page Layout footer background-color cccccc padding 10px height 40px clear both border-top 20px solid ffffff Looking back at the table we still need to add Gutters 1 2 and 3 to columns 1 2 and 3 using the margin-left property with a value that is 2 . We do not actually need to add Gutter 4 into the design because we have already allowed a little extra space to the right of the design. We will also create padding in the boxes by giving the padding property a value of 1 . Because the padding is added onto the width of the box to create a box that takes up 30 percent of the screen the width property for each column should have a value of 2 8 . 3 columns .column1of3 .column2of3 .column3of3 float left width 28 margin-left 2 background-color cccccc padding 1 margin-top 20px height 175px You can see the result in Figure 9-32. Figure 9-32 404 Chapter 9 Page Layout One of the issues with liquid layouts is that because the user can shrink and increase the width of the boxes in the layout the text may become too short or too long to read and any fixed-width items such as images may end up poking out of boxes if they are too small. In such cases you can make use of the min-width and max-width attributes which you read about in Chapter 7. Unfortunately IE7 was the first version of Internet Explorer to support these properties. Luckily the number of IE6 users is constantly shrinking and since other browsers have supported these properties for longer you should use them to help users whose browsers understand them . .column1of3 .column2of3 .column3of3 float left width 28 margin-left 2 background-color cccccc padding 1 margin-top 20px height 175px min-width 210px max-width 400px Once you specify a min-width property if a user shrinks the window down quite small you may find that content flows out of the boxes. You can use the overflow property to control what happens to content in such circumstances. Alternatively you could put the three columns in a .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.