Jump to content

table expanding

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Hajjel

Hajjel

    Newbie

  • Members
  • PipPip
  • 22 posts
Hello!
I got a problem. Im working with a forum in PHP.

If the post is wider then the table width, it expanding instead of start in a new row. How do i fix that?

My english is not the best, but i hope you people understand the problem.

echo "

<table border=1>

<td>

<table>

<tr><td>

<a href=profil.php?id=". $mem['id'] .">". $result['user'] ."</a><br>

". $result['tid'] ."<br>

<img src=". $mem['picture'] ." width=100px height=100px>

<tr><td>

</table>

</td>

<td valign=top>

<table width=300px>

<td><tr>

". $post ."

</td></tr>

</table>

</td>

</table>

";


#2
debtboy

debtboy

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 916 posts
define the width of TD and text will automatically wrap,
a nowrap option is also available.

<td width="200"> your unknown width data </td>
or
<td width="40%"> your unknown width data </td>

have you considered CSS for formatting?

#3
Hajjel

Hajjel

    Newbie

  • Members
  • PipPip
  • 22 posts

debtboy said:

define the width of TD and text will automatically wrap,
a nowrap option is also available.

<td width="200"> your unknown width data </td>
or
<td width="40%"> your unknown width data </td>

have you considered CSS for formatting?
That did not work.
Answer to second question: No.

#4
Hajjel

Hajjel

    Newbie

  • Members
  • PipPip
  • 22 posts

debtboy said:

define the width of TD and text will automatically wrap,
a nowrap option is also available.

<td width="200"> your unknown width data </td>
or
<td width="40%"> your unknown width data </td>

have you considered CSS for formatting?
Ops, it worked. I just placed the width in wrong TD, thanks!