Friday, April 15, 2011

Table Borders Css

When a table is defined by a tag with no styles specified, a borderless table as wide and as tall as its enclosed data is displayed. From this simple beginning you can structure and style a table to take on virtually any display characteristics you can imagine. table border property is used to set a stylish border for the table in a webpage.

Any border styles that were introduced earlier can be applied to the external border of a table This will results in.
e.g:
<style type="text/css">
table { border: solid 5px #0000FF}
td {border:outset 2px}
</style>

<table width="241">
  <tr>
    <td width="114">Cell 1.1</td>
    <td width="107">Cell 1.2</td>
  </tr>
  <tr>
    <td>Cell 1.3</td>
    <td>Cell 1.4</td>
  </tr>
</table>

 This will results in

Cell 1.1 Cell 1.2
Cell 1.3 Cell 1.4

The border style is described in below for each table. The stylesheet uses the standard format {border: size or style} for all border crossings stylings.

Dashed

Dotted
Double