Jump to content

Table: 3 cells above, 2 bottom


cs.punk

Recommended Posts

There is a table of 999 pixels WIDE!

There are 2 rows

  Row 1: 3 cells of which each has a width of 333 pixels.

  Row 2: I would like 2 cells that are equal in size... (but how do I do this?) As adding  ... <td colspan="2" ... just extends the table to

  width of 666 pixels (width of two cells on the above row)...

 

Within a <table> (>) <tr> (>) <td> <img src="image1" /><img src="image2" /> </td> How do I add so that image 2 does not show RIGHT NEXT TO

image 1, what I want is a 20 pixel gap between it? I dont wanna add another cell as theres a small line left of the image (with border="1")

Link to comment
Share on other sites

first, it sounds like you are trying to do layouts with tables, which is the old way of doing things. it's usually better to use DIVs and CSS to accomplish the layout you want.

 

to answer your question though, you will need a 6 column table, where the first row uses 2 columns per cell and the second row uses 3 columns per cell. so:

<table>
  <tr>
    <td colspan="2" width="33%"></td>
    <td colspan="2" width="33%"></td>
    <td colspan="2" width="33%"></td>
  </tr>
  <tr>
    <td colspan="3" width="50%"></td>
    <td colspan="3" width="50%"></td>
  </tr>
</table>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.