Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo tài liệu 'asp.net 1.1 insider solutions- p8', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 338 8 Building Adaptive Controls The Drop-Down Lists in Internet Explorer Interestingly in Internet Explorer 5.5 the drop-down lists open on top of the text boxes but not always on top of each other in the correct order depending on the order in which they are opened. The problem you have with Mozilla 1.5 and the SpinBox control is also related to the specifications of CSS2 not being totally comprehensive. Recall that the structure generated for the SpinBox control see Figure 8.13 is a root span element that is relatively positioned. The contained TextBox control is not positioned it simply appears in the flow of the page within the span control . However the two ImageButton controls carry the position absolute selectors so that they will be located at the right side of the TextBox control. span element position relative ImageButtons position absolute FIGURE 8.13 The structure of the standard SpinBox control. What happens is that the ImageButton controls which are rendered as input type image elements in the page are removed from the flow of the page by the position absolute selectors. This means that the span element is only sized to contain the TextBox control so the two ImageButton controls lie outside the span element in terms of location even though they are still child controls. Internet Explorer and Opera take into account the control hierarchy and the buttons work fine. However Mozilla does not consider the buttons to be part of the rendered page as far as the mouse pointer is concerned and it ignores mouse clicks on them. But if you place the cursor on the text box and press the Tab key you do in fact move the focus to them and can click them by pressing the Spacebar. Creating an Alternative Structure for the SpinBox Control One solution for the various problems with the SpinBox control is to offer an alternative structure for the controls that provides wider support for older browsers. The obvious approach is to use an HTML table to locate the TextBox and