Member Avatar

Hi,

Simple question:

How do you make a table with 2 columns?

On the left column - 1 row
On the right column - 2 rows

-Without using a nested table.

Thanks,
Ashton.

Recommended Answers

You can use rowspan.

<table>
  <tr>
    <td rowspan="2">1</td>
  </tr>
  <tr>
    <td>2</td>
    <td>3</td>
  </tr>
</table>
Jump to Post

You can use rowspan.

<table>
  <tr>
    <td rowspan="2">1</td>
  </tr>
  <tr>
    <td>2</td>
    <td>3</td>
  </tr>
</table>

You would need colspan for that, not rowspan. You would use rowspan like this:

<table>
  <tr>
    <td rowspan="2">1</td>
    <td>2</td>
  </tr>
  <tr>
    <td>3</td>
  </tr>
</table>
Jump to Post

All 8 Replies

You can use rowspan.

<table>
  <tr>
    <td rowspan="2">1</td>
  </tr>
  <tr>
    <td>2</td>
    <td>3</td>
  </tr>
</table>
Member Avatar

Thanks Bender ;)

You can use rowspan.

<table>
  <tr>
    <td rowspan="2">1</td>
  </tr>
  <tr>
    <td>2</td>
    <td>3</td>
  </tr>
</table>

You would need colspan for that, not rowspan. You would use rowspan like this:

<table>
  <tr>
    <td rowspan="2">1</td>
    <td>2</td>
  </tr>
  <tr>
    <td>3</td>
  </tr>
</table>
Member Avatar

Ya you're right

Crap... totally missed it. (That is what I meant though.) Must be the booze.

Member Avatar

Hahaha!

Wow I hope this isnt for a page layout...lol

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.