TAILIEUCHUNG - Beginning DotNetNuke 4.0 Website Creation in C# 2005 with Visual Web Developer 2005 Express phần 7

Mẹo Tôi đã tìm thấy thông qua kinh nghiệm khó khăn để luôn luôn đảm bảo rằng độ rộng của tất cả các bảng của bạn, hàng,và các tế bào tăng lên đến 100%. Trình duyệt khác nhau làm cho HTML hơi khác nhau. Ví dụ, nếu bạn có một bảng của 90%, Firefox | CHAPTER 7 CREATING A DNN MODULE 223 --Friday label -- td td valign middle width 16 --Saturday label -- td tr . table This table now has two rows in it. Each row is the same width as the table as a whole. The second row has seven cells in it. If you add up the width of each cell you will get 100 percent. The top row has two cells in it. The first cell spans two of the seven cells below it and the second cell spans five. Tip I have found through hard experience to always make sure that the widths of all your tables rows and cells add up to 100 percent. Different browsers render the HTML slightly differently. For instance if you have a table of 90 percent Firefox will rerender that table at 90 percent of itself every time you post back. This means that your table will get smaller and smaller with each round trip. Internet Explorer does not do this. So now that you have a little knowledge of how a table is constructed I will show you the code for the whole table with the controls from the WebPunch program added in. I made some changes to the controls which I will explain afterward. Listing 7-2 shows the complete table code. Listing 7-2. Complete HTML code to render the time card table @ Control Language C Inherits CodeFile AutoEventWireup true @ Register TagPrefix dnn TagName Audit Src controls table id TimeCard border 0 width 100 height 100 tr width 100 valign middle td colspan 2 asp DropDownList ID cmbWeek runat server Width 100 OnSelectedIndexChanged cmbWeek_SelectedIndexChanged AutoPostBack True asp DropDownList br br td td colspan 5 nbsp td tr tr width 100 align center valign middle 224 CHAPTER 7 CREATING A DNN MODULE td valign middle width 14 -- Sunday label -- asp Label ID Label1 runat server BorderStyle None Text Sunday Width 80 asp Label td td valign middle width 14 --Monday label -- asp Label ID Label6 runat server BorderStyle None Text Monday Width 80 asp Label td .

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