Get Node Cookbook PDF

This presents fairly well in its raw, unstyled form when viewed in a browser, as shown in Figure 2-6. The order of content in an unstyled page is important, although not a top priority for this site, because the target audience uses modern browsers on regular PCs.

Most notably, level 2 headings are used at the top of both the main content area and the sidebar on all pages, yet have different appearances. This is achieved using descendant selectors in the style sheet. The following markup reflects a simplified sidebar. Note that the

element in the main content does not have a unique ID or class either.

Figure 1-9 shows the two background images used for the two

elements. Figure 1-9. Two jagged background images are used for the two differently sized level 2 headings.

By using descendant selectors, the CSS rules can be made more specific, and there is no limit to how far down the tree a descendant selector will go—the child of a child of a child of a parent perhaps? For the Dirty Pretty Things discography, a table is populated with rows of information relating to each song. If a song has lyrics, audio, video, guitar tabs, or images assigned to it, a small check image is placed in the appropriate cell. The markup is fairly straightforward and is bereft of any additional IDs or classes.

Download PDF sample

Node Cookbook by David Mark Clements


by James
4.2

Rated 4.03 of 5 – based on 6 votes