TAILIEUCHUNG - Learning Web Design Third Edition- P16

Learning Web Design Third Edition- P16:Everything you need to know to create professional web sites is right here. Learning Web Design starts from the beginning defining how the Web and web pages work and builds from there. By the end of the book, you'll have the skills to create multi-column CSS layouts with optimized graphic files, and you'll know how to get your pages up on the Web. | Cell Padding and Spacing Serving Size Smail 8oz. Medium 16uz. Large 24oz. Figure 8-8. The rowspan attribute stretches a cell downward to span the specified number of rows. Some hints Rows always span downward so the oranges cell is part of the first row. Cells that are spanned over do not appear in the table code. Again notice that the td elements for the cells that were spanned over the first cells in the remaining rows do not appear in the source. exercise 8-3 I Row spans Try writing the markup for the table shown in Figure 8-9. If you re working in an HTML editor don t worry if your table doesn t look exactly like the one shown here. The resulting markup is provided in Appendix A. apples oranges pears bananas pineapple lychees Figure 8-9. Practice row spans by writing the markup for this table. Cell Padding and Spacing By default cells are sized just large enough to fit their contents see the left example in Figure 8-10 but often you ll want to add a little breathing room around tabular content. There are two kinds of space that can be added in and around table cells cell padding and cell spacing using the cellpadding and cellspacin attributes respectively. These attributes may be used with the table element only. In other words you can t apply them to td or h elements. Because matters of spacing are presentational we ll talk about CSS alternatives to these attributes as part of the discussion. Cell padding Cell padding is the amount of space held between the contents of the cell and the cell border. If you don t specify any cell padding the cells will have the default value of one pixel of padding. Figure 8-10 shows the result of the following markup compared to a sample in which no padding or spacing is specified. table cellpadding 15 tr td CELL 1 td td CELL 2 td tr 136 Part II HTML Markup for Structure Cell Padding and Spacing tr td CELL 3 td td CELL 4 td tr table By default table cells expand just enough to fit Cell padding adds space between the edge of the

Đã 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.