Beginning HTML, XHTML, CSS and JavaScript - Code Examples

Back to main book index

Chapter 8: Advanced Cascading Style Sheets

Here are the examples for Chapter 8, which continues to look at CSS.

Links

ch08_eg01.htmlStyling Links

Backgrounds

ch08_eg02.htmlThe background-color property
ch08_eg03.htmlThe background-image property
ch08_eg04.htmlThe background-image property with improved contrast
ch08_eg05.htmlThe background-repeat property with a value of repeat-x
ch08_eg06.htmlThe background-repeat property with a value of repeat-y
ch08_eg07.htmlThe background-repeat property with a value of no-repeat
ch08_eg08.htmlThe background-position property
ch08_eg09.htmlThe background-attachment property

List Styles

ch08_eg10.htmlThe list-style-type property for list symbols
ch08_eg11.htmlThe list-style-position property with values of inside and outside
ch08_eg12.htmlThe list-style-image property

Tables

ch08_eg13.htmlTable example
ch08_eg14.htmlThe border-collapse property
ch08_eg15.htmlTable example with borders collapsed
ch08_eg16.htmlThe border-spacing property
ch08_eg17.htmlThe caption-side property with value of bottom (only works in netscape 6+)
ch08_eg18.htmlThe empty cells property

Outlines

ch08_eg19.htmlThe outline property

Pseudo-classes

ch08_eg20.html:focus pseudo-class
ch08_eg21.html:after pseudo-class

Generated Content

ch08_eg22.htmlCounters
ch08_eg23.htmlQuotations

Misc Properties and Rules

ch08_eg24.htmlThe cursor property
ch08_eg25.htmlThe visibility property
ch08_eg26.htmlUsing imported code styles

CSS Positioning

ch08_eg27.htmlNormal flow
ch08_eg28.htmlRelative positioning
ch08_eg29.htmlAbsolute positioning
ch08_eg30.htmlFixed positioning
ch08_eg31.htmlz-index
ch08_eg32.htmlFloat
ch08_eg33.htmlClear
Try It OutPage Layout Example

Exercises

Exercise 1 
Exercise 2