Thursday 19th of October 2017 04:17:57 PM

Style Guide

CSS Style Sheets & Tips

Library projects must use valid Cascading Style Sheets (CSS) to control typography, color, and other layout elements. Style Sheets must be linked in a way that accommodates the capabilities of new and old browsers.

without increasing the height. This could possibly mean adding ascrollbar to the element, as shown in Figure 8-4.

Figure 8-4

Figure 8-4. One way to handle a short height on a tall element

In practice, most browsers will not do this. They will instead simplyincrease the height of the element, as though the value ofheight had been set to auto.This is permitted under CSS1, which states that browsers can ignoreany value of height other thanauto if an element is not a replaced element such

CSS Guidelines 1, 2, 3
Introduction to CSS (with examples), CSS definitions and benefits, tips on authoring, plus extensive resources
Steal These Style Sheets!
Style Sheets for your use in Library projects
CSS Validation
Ensuring that your Style Sheets are error–free (same as XHTML validation)

A number of valid Style Sheets have been provided for your use. If you wish to create your own Style Sheets, please discuss your requirements with the Branch Library's Web Coordinator.

Another important point is that when an element is positioned, it establishes a containing block for its descendant elements. For example, we could absolutely position an element and then absolutely position one of its children, as shown in Figure 9-23.

Figure 9-23

Figure 9-23. Nested absolutely positioned elements

The small box B in the lower-left corner of the element A is a child of A, which is in turn a child of a relatively positioned DIV. B was absolutely positioned, as was element A, using styles like these: margin-left, border-left,padding-left, width ,padding-right, border-right,and margin-right. These are illustrated in Figure 8-9. The values of these seven properties mustequal the value of width for an element'sparent.

Figure 8-9

Figure 8-9. The "seven properties" of horizontal formatting

Only three of these seven properties can be set toauto: the width of the