|
Controlling The Look of Each Cell
Each cell can have its own background or background image in the
same way as we have seen before. This demonstrated in the first
row.
In the second row we have used the align
attribute. Here it works in a different way as it aligns the contents
of the cell. Left, right and center are valid as before.
Valign aligns the contents of the cell
vertically so top, middle and bottom are valid.
Width attribute can be used to control
the width of each cell. It will only be needed in one row since
all cells in the column must be the same width. It is common to
to leave one column without a width so it can expand and contract
whilst the others are fixed width="*"
tells the browser to allocate the remaining space to that
cell.
You cannot control the border, cellpadding or cellspacing
of individual cells although it will work with some versions of
IE.
|