RE: [PHP] table width problems
You can use the code below to trim a string to a specified number of charecters. Change 64 to how long you want the string to be. This won't cut words in half. wordwrap( $text, 64, Br, 0); -Original Message- From: Adriaan Nel [mailto:[EMAIL PROTECTED] Sent: Sunday, February 23, 2003 10:27 AM To: [EMAIL PROTECTED] Subject: [PHP] table width problems Hi, I've got a table that gets it's contents from a database, the problem is that even though I specify the width of the table, it is still wider than it's supposed to be, cause some of the info from the table doesn't wrap.my question is if there is a way to force td wrapping when it exceeds the allowed width?? Please help thanks Adriaan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] table width problems
If your html table is too wide that is useually due to a pixel size or a percentage which is too large. You could try playing around with those values and calculate how much columns you have and maybe how much of a percentage size they should have relative to the screen width tables can be a bit tricky though especially when nesting them.. if wordwrap( ) doesnt help you, you could post your html source, and we can take a look at it gl Dennis Cole [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] You can use the code below to trim a string to a specified number of charecters. Change 64 to how long you want the string to be. This won't cut words in half. wordwrap( $text, 64, Br, 0); -Original Message- From: Adriaan Nel [mailto:[EMAIL PROTECTED] Sent: Sunday, February 23, 2003 10:27 AM To: [EMAIL PROTECTED] Subject: [PHP] table width problems Hi, I've got a table that gets it's contents from a database, the problem is that even though I specify the width of the table, it is still wider than it's supposed to be, cause some of the info from the table doesn't wrap.my question is if there is a way to force td wrapping when it exceeds the allowed width?? Please help thanks Adriaan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] table width problems
Yeah you could try table width=100% valign=top align=left (plus, of course, the rest of the parameters for this tag.) td width=100% align=left is good along with that too. That should keep it from exceeding the width of the page, unless you have one or more other tables next to it... In that case you need to specify the correct percentage of 100 % to make them all fit the way you need. -Tom Hi, I've got a table that gets it's contents from a database, the problem is that even though I specify the width of the table, it is still wider than it's supposed to be, cause some of the info from the table doesn't wrap.my question is if there is a way to force td wrapping when it exceeds the allowed width?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] table width problems
usually i would do something like: table width=(number in pixels) .. tr td width=(# of colums in row devided by table width in bixels) .. - Original Message - From: Adriaan Nel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February 23, 2003 10:26 AM Subject: [PHP] table width problems Hi, I've got a table that gets it's contents from a database, the problem is that even though I specify the width of the table, it is still wider than it's supposed to be, cause some of the info from the table doesn't wrap.my question is if there is a way to force td wrapping when it exceeds the allowed width?? Please help thanks Adriaan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/11/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php