Prev | Current Page 336 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

Although you
In Chapter 3, we warned against using text with low contrast against a background
graphic. In the case of the table??™s footer in this exercise, the contrast is lower than for
other text, but it??™s still readable; also, the content is not a huge chunk of body copy??”
it??™s only a single line of text.
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
250
could conceivably add a class (setting a background color) to alternating rows, such a
solution is poor when creating a static site??”if you had to add a row in the middle of the
table, you??™d need to update every subsequent table row start tag, which is hardly efficient.
David Miller??™s article, ???Zebra Tables,??? on A List Apart (see www.alistapart.com/articles/
zebratables/), offers a far more elegant solution. This was later reworked by Matthew
Pennell (www.thewatchmakerproject.com), whose article ???Stripe Your Tables the OO Way???
(www.thewatchmakerproject.com/journal/309/stripe-your-tables-the-oo-way) offers
the lowdown on his technique, including an improved version of his script at www.
thewatchmakerproject.com/zebra.html.
Required files styling-the-playlist-table.html, styling-the-playlisttable.
css, table-header-stripe.gif, and styling-theplaylist-
table-stripes.js from the chapter 6 folder.
What you??™ll learn How to add separator stripes to a table.
Completed files styling-the-playlist-table-stripes.html and styling-theplaylist-
table-stripes.


Pages:
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348