cs.punk Posted March 4, 2009 Share Posted March 4, 2009 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") Quote Link to comment https://forums.phpfreaks.com/topic/147920-table-3-cells-above-2-bottom/ Share on other sites More sharing options...
rhodesa Posted March 4, 2009 Share Posted March 4, 2009 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> Quote Link to comment https://forums.phpfreaks.com/topic/147920-table-3-cells-above-2-bottom/#findComment-776337 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.