homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

Help - Text

10+ Year Member

Msg#: 3923893 posted 1:49 pm on Jun 1, 2009 (gmt 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?



WebmasterWorld Senior Member demaestro us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3923893 posted 4:09 pm on Jun 1, 2009 (gmt 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]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved