Table columns rendering

A

ami.aga

I have the following HTML table.
1st row= 2 cols
2nd row = 1col
3rd row = 3 columns

The first row should spread out across the table with each cell
occupying half of the coumnspan.
The code below does not render the 1st row properly.
help!

<html>
<head>
</head>
<body>
<table border="1">
<tr>
<td colspan="2">
abc
</td>
<td >
bcd
</td>
</tr>
<tr>
<td colspan="3">
cde
</td>
</tr>
<tr>
<td>
def
</td>
<td>
efg
</td>
<td>
fgh
</td>
</tr>
</table>
</body>
</html>
 
B

Ben C

I have the following HTML table.
1st row= 2 cols
2nd row = 1col
3rd row = 3 columns

The first row should spread out across the table with each cell
occupying half of the coumnspan.

No, what it's doing looks right to me. Cells in a column are always
aligned. In this case since you want to split the width 2 ways at the
top and 3 ways at the bottom you need 6 (the lowest common multiple of 2
and 3) columns altogether.

I suggest make the two cells in the first row colspan="3", give the cell
in the second row colspan="6", and each cell in the third row
colspan="2".
 
R

Rob Waaijenberg

(e-mail address removed) schreef:
I have the following HTML table.
1st row= 2 cols
2nd row = 1col
3rd row = 3 columns

The first row should spread out across the table with each cell
occupying half of the coumnspan.
[snipped]

That is going to be a very curious table.

I can understand how you could have 3 columns of data and 1 table-wide
header

but I do not understand how you can have a meaningful table with 3
columns, and then split two headers halfway the 2nd data-column.

Rob
 
A

ami.aga

It worked it worked!!!!
Thx Ben!!

Following code works just as I wanted it to!!

<html>
<head>
</head>
<body>
<table border="1">
<tr>
<td colspan="3">
abc
</td>
<td colspan="3">
bcd
</td>
</tr>
<tr>
<td colspan="6">
cde
</td>
</tr>
<tr>
<td colspan="2">
def
</td>
<td colspan="2">
efg
</td>
<td colspan="2">
fgh
</td>
</tr>
</table>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top