SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 337 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

css in the chapter 6 folder (along with
the GIF image and JavaScript document, neither of which are
amended).
1. Link to the JavaScript document. Taking things up from the completed table from
the previous exercise (also available in the download files as styling-theplaylist-
table.html and styling-the-playlist-table.css), add a script element
in the HTML document??™s head section to link to the JavaScript file
styling-the-playlist-table.js. Note that the JavaScript document is also available
in the download files.

2. Give the table a unique id. For the script to do its work, the table start tag must
be given a unique id value. This must match the value given in styling-theplaylist-
table.js in the onload function. Therefore, add the id attribute and
value shown in the following code block:

In the JavaScript, the relevant code that matches this is already defined, as shown
in the following code block:
window.onload = function() {
zebraTable.stripe('playlist1');
}
Applying separator stripes
TABLES: HOW NATURE (AND THE W3C) INTENDED
251
6
3. Assign a separator stripe style. The script creates alternating table rows, which are
given a class value of alt. This can then be styled in CSS by using a rule with the
selector tbody tr.


Pages:
325326327328329330331332333334335336 337 338339340341342343344345346347348349
hotel jelenia góraRussian brideFree English grammar and study guidpowiekszenia wielkoformatowecounter strike 1.6