Sunday, March 20, 2011

Setting up a style in table header and data records

Just sharing you the basic but a good look style for table display.

table tr td, table tr th {
        font-size: 9px;
        background-color: #ECEFF5;
        border: 1px dotted #0B3485;
        color: #0B3485;
        height: 25px;
        padding: 2px;
        vertical-align: middle;
}


Details are as follows:
  • font-size - The size of the font you want.
  • background-color - The background color of your table.
  • border - The border of your table, I set it to 1px dotted to be not so usual.
  • color - The color of your text.
  • height - The height of each table row.
  • padding - This is to setup a padding in displaying records.
  • vertical-align - To align the data vertically. I set it to middle to vertically align it in center.

No comments:

Post a Comment