By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,623 Members | 1,301 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,623 IT Pros & Developers. It's quick & easy.

Strange behavior of a table

P: n/a
I produce a list of tables with PHP, which outputs a lot of tables
with the following HTML-Code:

<table border="1" width="96%" cellspacing="0" cellpadding="0"
align="center" bordercolor="#510303" style="border-collapse:collapse">
<tr>
<td align="center" valign="middle" bgcolor="#CC3333" width="30">
<input type="CHECKBOX" name="boxXYZ">
</td>
<td bgcolor="#E1D6B6" align="left"><div style="margin:2pt">
Eintrag Nr. XYZ von <b>XYZ";</b> vom $zeit um $uhr Uhr
<br>
Homepage: $homepage<br>Host-Adresse: $host";
</div></td>
</tr>
<tr>
<td colspan="2" align="left"><div style="margin:2pt">$text
</div>
</td>
</tr>
</table>
<p>

The first <td> has a width of 30 px. IE6 shows th correct size, if the
content of the <td> in the second <tr> is less than 4 lines of text.
If there are mor than 4 lines, the first <td> will show a width of
more than 50 px. The terms beginning with $ are PHP variables, which
will show the text contents in real. The tables are part of a guest
book system.

I don't understand that. Is there a reason for that?

Thanks for help and: Merry Christmas to all!

Hartmut
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
It works OK when I try it. If you copy and paste examples of the outputted
HTML (and not the php code) we may be able to help

My immediate thoughts are to avoid using divs wherwe not needed.
So instead of: <td colspan="2" align="left"><div style="margin:2pt">
use <td colspan="2" align="left" style="margin:2pt">

"Hartmut J?ger" <ha************@arcor.de> wrote in message
news:59**************************@posting.google.c om...
I produce a list of tables with PHP, which outputs a lot of tables
with the following HTML-Code:

<table border="1" width="96%" cellspacing="0" cellpadding="0"
align="center" bordercolor="#510303" style="border-collapse:collapse">
<tr>
<td align="center" valign="middle" bgcolor="#CC3333" width="30">
<input type="CHECKBOX" name="boxXYZ">
</td>
<td bgcolor="#E1D6B6" align="left"><div style="margin:2pt">
Eintrag Nr. XYZ von <b>XYZ";</b> vom $zeit um $uhr Uhr
<br>
Homepage: $homepage<br>Host-Adresse: $host";
</div></td>
</tr>
<tr>
<td colspan="2" align="left"><div style="margin:2pt">$text
</div>
</td>
</tr>
</table>
<p>

The first <td> has a width of 30 px. IE6 shows th correct size, if the
content of the <td> in the second <tr> is less than 4 lines of text.
If there are mor than 4 lines, the first <td> will show a width of
more than 50 px. The terms beginning with $ are PHP variables, which
will show the text contents in real. The tables are part of a guest
book system.

I don't understand that. Is there a reason for that?

Thanks for help and: Merry Christmas to all!

Hartmut

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.