TAILIEUCHUNG - Learning Web Design Third Edition- P22

Learning Web Design Third Edition- P22: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. | The Big Concepts p font-size small font-family sans-serif Figure 11-7. Certain properties applied to the p element are inherited by their children. Notice that I ve been saying certain properties are inherited. It s important to note that some style sheet proper ties inherit and others do not. In general properties related to the styling of text font size color style etc. are passed down. Properties such as borders margins backgrounds and so on that affect the boxed area around the element tend not to be passed down. This makes sense when you think about it. For example if you put a border around a paragraph you wouldn t want a border around every inline element such as em strong or a it contains as well. You can use inheritance to your advantage when writing style sheets. For example if you want all text elements to be rendered in the Verdana font face you could write separate style rules for every element in the document and set the font-face to Verdana. A better way would be to write a single style rule that applies the font-face property to the body element and let all the text elements contained in the body inherit that style Figure 11-8 . p font-size small font-family sans-serif Figure 11-8. All the elements in the document inherit certain properties applied to the body element. 196 Part III CSS for Presentation The Big Concepts Any property applied to a specific element will override the inherited values for that property. Going back to the article example we could specify that the em element should appear in a serif font and that would override the inherited sans-serif setting. Conflicting styles the cascade Ever wonder why they are called cascading style sheets CSS allows you to apply several style sheets to the same document which means there are bound to be conflicts. For example what should the browser do if a document s imported style sheet says that hl elements should be red but its embedded style sheet has a rule that makes hls purple The folks who .

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.