using css with html tables

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
rathlon
Forum Commoner
Posts: 45
Joined: Sun Nov 10, 2002 8:07 pm

using css with html tables

Post by rathlon »

How do you use the colspan property or what is the likewise property in css?
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

You can't. colspan is nothing to do with decorating the page which is what basically CSS does.
f1nutter
Forum Contributor
Posts: 125
Joined: Wed Jun 05, 2002 12:08 pm
Location: London

Post by f1nutter »

colspan lets you merge the cells of a table

Code: Select all

|-------|-------|-------|-------|
| cell1 | cell2 | cell3 | cell4 |
|-------|-------|-------|-------|
| cell5 |  merged cell  | cell6 |
|-------|-------|-------|-------|
| cell7 | cell8 | cell9 | cell0 |
|-------|-------|-------|-------|

Code: Select all

<table>
 <tr>
  <td>cell1</td>
  <td>cell2</td>
  <td>cell3</td>
  <td>cell4</td>
 </tr>
 <tr>
  <td>cell5</td>
  <td colspan=2>merged cell</td>
  <td>cell6</td>
 </tr>
 <tr>
  <td>cell7</td>
  <td>cell8</td>
  <td>cell9</td>
  <td>cell0</td>
 </tr>
</table>
You can do the same with rowspan, merging cells vertically.
Post Reply