November 21, 2004

November Workshop Notes

At the November meeting, we completed our overview of Cascading Style Sheets.

We pointed out sites that use CSS, not just for appearance but also for user friendliness such as size of text. CSS lets the developer create one HTML page and re-use it for different purposes, such as a print-friendly version. Examples shown were Providence Journal, CSS Zen Garden, and Schuylkill Township's minutes pages.

In our first meetings, we have used CSS to style tags like BODY, P, H1..., ADDRESS, and ACRONYM. We worked generally on setting margins, font styles, colors and alignment. We made the point that if you change the color of text, be sure to set a background color in order to cover the possibility that users might change the default background color of their browsers.

We did some basic formating with margins and line heights. Note generally that horizontal spacing concatenates, that is, it is cumulative-- if your page body has a left margin of 20px, and your paragraphs have left margins of 30px, the paragraphs will be set off from the left by the total of the two settings, 50px.

Vertical spacing works differently--it collapses. If you have a heading tag that has a bottom margin of 20px and your text has a top margin of 30px, the spacing between the two will collapse to the largest size, 30px.

Note also that you can use negative numbers and move elements outside of their normal box. You can thus have overhanging indents or text that overlaps the text above or below it.

In the coming months, we will be delving into individual topics and covering in more depth the topics we reviewed in our initial meetings.

No comments: