Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Help - Text

1:49 pm on Jun 1, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 14, 2004
posts: 49
votes: 0

I have a column in my MySQL database which is 'text' type. After executing a query and pulling the data from this column I am displaying it in a table. Thing is, it is extending the table width hugely which is no good. How do I prevent this happening?

Ive tried specifying the HTML table width in px instead of % yet it is still extending it. Can anyone help?

4:09 pm on June 1, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 15, 2003
votes: 0

Most likely the reason for this is a very long string in the field that is pushing the table wide.

For example. The following string is going to push the table width because there is no space for it to break onto another line.


Is this the case? If so you are going to need to clean up the text in the offending field.

Or, something I have done in the past is to cut off the field to 50 or so chars and add a link at the end with the the text of "....more"

Clicking that will show you the full text in a seperate window so it doesn't break your layout.

[edited by: Demaestro at 4:11 pm (utc) on June 1, 2009]

[edited by: engine at 8:03 am (utc) on June 3, 2009]