TAILIEUCHUNG - Tự học HTML và CSS trong 1 giờ - part 31

Tham khảo tài liệu 'tự học html và css trong 1 giờ - part 31', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 276 lesson 10 Building Tables percentage of the full table width . As with table widths using percentages rather than specific pixel widths is a better idea because it allows your table to be displayed regardless of the window size. Column widths are useful when you want to have multiple columns of identical widths regardless of their contents for example for some forms of page layout . Figure shows your original table from Figure . This time however the table spans 100 of the screen s width. The first column is 40 of the table width and the remaining three columns are 20 each. To accomplish this the column widths are applied to the heading cells as follows Input table border 1 width 100 caption Vital Statistics caption tr th width 40 Name th th width 20 Height th th width 20 Weight th th width 20 Eye Color th tr table Output FIGURE A table with manually set column widths. Vital Statistics Vital Statistics Kame Height Weight CX What happens if you have a table that spans 80 of the screen and it includes the same header cells 40 20 20 and 20 as in the preceding example Revise the code slightly changing the width of the entire table to 80 as shown in Figure . When you open the new table in your browser you ll see that the table now spans 80 of the width of your screen. The four columns still span 40 20 20 and 20 of the table. To be more specific the columns span 32 16 16 and 16 of the entire screen width Download from Sizing Tables Borders and Cells 277 Input table border 1 width 80 caption Vital Statistics caption tr th width 40 Name th th width 20 Height th th width 20 Weight th th width 20 Eye Color th tr table Output FIGURE A modified table with manually set column widths. If you are going to specify cell widths make sure to either specify the widths for cells only on one row or to the same values for every row. If you specify more than one value for the width of a column by specifying different values on multiple rows

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