HTML and CSS Reference
Getting better already! But nothing we've done so far is table specific. We've simply styled
some type and added some borders, just as we can do on any element with CSS.
CSS defines two separate models for table borders: collapsed and separate. The default ren-
dering mode for most browsers is the separate model, in which borders around cells are kept
separate from one another. For example, adding a one-pixel border to our example table
in separate mode produces the results shown in Figure 10-5.
Figure 10-5. Table borders in the separate model
You'll note there is some space between each cell, and each cell receives its own, noncon-
necting border. Let's change the border model to collapsing before we add our border, like so:
margin: 0 auto;
font-family: Lucida Grande, Verdana, Helvetica, Arial, sans-serif;
border-bottom: 1px solid #000;
border: 1px solid #ccc;