iTechtalk


If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.



Reply
Old 11-21-2008, 10:20 AM   #1 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 1
Smile Adding Cell Spacing for HTML Page

We can specify cell spacing within a table. The property is called cell spacing (cell spacing as an attribute of the TABLE element).

Cell spacing refers to: Cell spacing is the space between the border on the inside of one cell and the border on the inside of the next cell or the outside border of the table.

When you classify borders, borders are actually around each cell, and a separate border is around the entire table. If the borders are thin and there is no cell spacing, it will look like it is one line that encloses the cells and attaches to the border around the table. The more cell spacing you define, the clearer it will be that these are separate lines.



The previous table has no cell spacing.

The previous table has cell spacing. The spacing attribute is defined as part of the

TABLE element as follows:

<TABLE cellspacing=”3”>

Or, as part of a style sheet:
TABLE {
cellspacing: 3
}

Amateur to CSS2, you can specify different values for horizontal space between cells and for vertical space between cells.

>The first value supplied to the cellspacing property is for horizontal cell spacing;

> The second is for vertical cell spacing.

If you provide only one, it applies to both kinds of cell spacing.

Also new to CSS2, you can collapse borders, removing the cell spacing altogether. This makes your table look more like the way a table appears in a word-processing document.

The property is called border-collapse. This applies only to table elements: TABLE, COLGROUP, COL, THEAD, TFOOT, TBODY, TR, TH, and TD.

TABLE {
border-collapse: collapse;
}

The default value of border-collapse is separate. You can choose between the keywords collapse and separate.
ftrvision is offline   Reply With Quote
Reply

Bookmarks

Tags
cell, css2, html, spacing

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:10 AM. itechtalk