Hands On Practice 8.4

Click Here to View Exercise


Chapter 8


Hands On Practice 8.4 P.323

In this exercise I configured an informational table.

I deleted the following

<table border="1" width="75%" align="center" cellpadding="5" cellspacing="0">

I replaced it by using CSS with the following

table { border: 1px solid #5c743d;
           width: 75%;
           margin: auto; }

To configure the td and th selectors I used the following CSS code.

td, th { border: 1px solid #5c743d;
           padding: 5px; }

Then I added the border-collapse property

border-collapse: collapse;

This is used to eliminate the empty space between the table cell borders.

To create a repeating background color I created a class called altrow.

.altrow { background-color:#d5edb3; }