tailieunhanh - Học JavaScript qua ví dụ part 61
Làm việc với lề và biên giới Container. Khi bạn nhìn vào tài liệu của bạn, nó bao gồm một số lượng container. Các tag là một container và nó có thể chứa một nhóm, một đoạn văn, bảng, hoặc các yếu tố khác. | Common Style Sheet Properties 547 Working with Margins and Borders Containers. When you look at your document it is composed of a number of containers. The body tag is a container and it may contain a heading a paragraph a table or other elements. Each of these elements also can be thought of as a container. The div tag is another special type of container used to define logical divisions with the content of a page. You can use the div tag to center a block of content or position a content block in a specific place on the page. Margins Padding and Borders. Each container has an outer margin and the margin can have some padding space between it and the next container . The padding is like the CELLPADDING attribute of a table cell. On the inside of the padding is a border that separates the container from its contents. The border is normally invisible. You can change the margin create colorful borders or increase or decrease the padding to give the page more style. See Figure for a graphic representation and Table for a list of margin and border properties. Different browsers might handle the borders differently. Margins and borders will behave better if enclosed within div tags. margin padding border Figure How an element is contained. Table Margin and Border Properties Property Value Example Elements Affected border-bottom border-bottom-width or border-style or color All border-bottom-width thin medium thick 2em All border-color red green 0C0 All border-left border-left-width or border-style or color All Continues From the Library of 548 Chapter 14 Introduction to CSS Cascading Style Sheets with JavaScript Table Margin and Border Properties continued Property Value Example Elements Affected border-left-width thin medium thick 3em All border-right border-right-width or border-style or color All border-right-width thin medium thick 1cm All border-style none dotted dashed solid double groove ridge inset outset 1 4 .
đang nạp các trang xem trước