Wednesday, February 22, 2006

CSS Contextual Selectors and Colors

At the end of class yesterday a few of us were talking about ways to specify different styles for different parts of a web page. I put together a very simple (and very ugly) example page on "contextual selectors" in CSS. Compare the source code (which you can find by following any of the hyperlinks on the page) with the HTML source to see how various "class" assignments and nesting techniques can give you more flexibility with your styles. There are a few different approaches to this issue, each with its own problems depending upon the structure of the particular page. Experiment and find what works for you.

I've also added the contextual selector example to the Web Resources page for our class, along with a link to the Visibone Web Safe Color Table, a handy way to look up the hexidecimal (six-character) code for colors.

0 Comments:

Post a Comment

<< Home