TAILIEUCHUNG - Learning Web Design Third Edition- P30

Learning Web Design Third Edition- P30: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. | Margins CSS TIP Browser Default Margins You may have noticed that space is added automatically around headings paragraphs and other block elements. That s the browser s default style sheet at work applying margin amounts above and below those elements. It is good to keep in mind that the browser is applying its own values for margins and padding behind the scenes. These values will be used unless you specifically override them with your own style rules. If you are working on a design and coming across mysterious amounts of space that you didn t add the browser s default styles may be the culprit. Adding a margin to the body element adds space between the page content and the edges of the browser window. margin Values length measurement percentage auto inherit Default auto Applies to all elements Inherits no The margin properties are very straightforward to use. You can specify an amount of margin to appear on each side of the element or use the margin property to specify all sides at once. The shorthand margin property works the same as the padding shorthand. When you supply four values they are applied in clockwise order top right bottom left to the sides of the element. If you supply three values the middle value applies to both the left and right sides. When two values are provided the first is used for the top and bottom and the second applies to the left and right edges. Finally one value will be applied to all four sides of the element. As for most web measurements em units are your best bet for providing margin amounts that scale along with the text. Pixel values are commonly used as well. You can also provide a percentage value but it should be noted that as for padding the percentage value is calculated based on the width of the parent element. If the parent s width changes so will the margins on all four sides of the child element. The auto keyword allows the browser to fill in the amount of margin necessary to fit or fill the available space. Figure .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.