• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 14. Styling a Data Table > Styling the <tr> Element

Styling the <tr> Element

The <tr> element should be styled with a background-color as shown in Listing 14.12. This color can be changed to suit your needs. The results can be seen in Figure 14.2.

Listing 14.12. CSS Code for Styling the <tr> Element

caption
{
    text-align: left;
    margin: 0 0 .5em 0;
    font-weight: bold;
}

table
{
          border-collapse: collapse;
}

th, td
{
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
    padding: .5em;
}

tr
{
    background: #B0C4D7;
}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint