PDA

View Full Version : bugs in coding table


dominicosavio
04-01-2003, 02:41 PM
I have this table:

TABLE
TR
TD
image 1
/TD
TD rowspan=2
text text text
/TD
/TR
TR
TD valign=top
image 2
/TD
/TR
/TABLE

and the problem occurs when I want image 2 butt up against image 1, when the text in TD rowspan=2 getting longer.

for a better understanding, please come here: http://www.tntt.org/thanhtam/table.htm

Mhtml
04-01-2003, 02:55 PM
I took the liberty of rearranging your code, it is easier this way!

<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<div><img name="magic20gui_r1_c1" src="gui_r1_c1.jpg" width="131" height="302" border="1" alt=""></div>
<div><img name="magic20gui_r2_c1" src="gui_r2_c1.jpg" width="131" height="185" border="0" alt=""></div>
</td><td><p>text text text text text text text text text text text</p></td>
</tr>

dominicosavio
04-01-2003, 03:05 PM
Thank you for you reply, but it won't work.

The image 1 one is actually an include, that image can be of any size (only the height changes) and it is more complicated than just this (ie. background of the page, of the table, etc, dynamic content ...). That's why I have to use the structure I am using now.

The page I try to fix actually looks like this: http://www.tntt.org/thanhtam/index.asp

.::DropFrog::.
04-01-2003, 07:03 PM
Why dont you use nesting to solve your problem???.. I.E.


<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>image</td>
</tr>
<tr>
<td>image</td>
</tr>
</table>
</td>
<td>poopy text</td>
</tr>
</table>

Mhtml
04-01-2003, 09:45 PM
I agree, (nowthat I know what you want;)) nested tables are a good idea. I'm in a rush right now so I can't show you an alternative, I'll be back though. :)

meow
04-01-2003, 10:22 PM
There's too much table code already if I'm not missing something. Take away the second raw and put both images in the first cell. Then you just need to align the images vertically. I don't know if you want them at the top or in the middle. Change to valign="middle" if that's what you want. :)


<table>
<tr>
<!-- On one line to avoid gaps. -->
<td width="131" valign="top""><IMG1><IMG2></td>
<td>
TEXT
</td>
</tr>
</table>

Mhtml
04-02-2003, 07:11 AM
lol, I need glasses. What you posted meow was going to be what I said but I thought it couldn't be a fixed width.

(only the height changes)

I'm having such a bad day.