CSS Spreadsheet Style

August 15, 2006

If you want to create a table with a spreadsheet-like look, you can use the following style:

 
table, tr, td {

    border-style:solid;
    border-width:1px;
    border-color:#C6C3C6;
    border-collapse:collapse;

}

The important property here is border-collapse which makes table cells share adjacent borders. If you omit it, the default separate value will be used for this property, and the table cells will have their own borders.

Alternatively, one can use the following style with the same effect:

table {
    border-collapse: separate;
}
td {
    border: 1px solid #ccc;
}

 A very nice example on how to build a percentage bar with two images and css!

A very well organized css tutorial at CSS Basics.com.

Comments »

The URI to TrackBack this entry is: http://jdev.blogsome.com/2006/08/15/css-shreadsheet-style/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>