leegold2
Technical User
- Oct 10, 2004
- 116
I'm looping through a DB and displaying a "shaved down" brief display of each record in tabular format via HTMl tables. For one particular field (ie. table cell) I do:
$table_content = substr($full_content, 0, 170);
With that I am selecting the first 170 characters of content which I then put into the table cell with the link "...more" tagged onto the end - which links to a specific detail page for that record.
My question is I want to try and format this column of cells. Even though I'm putting in the same number of chars into each table cell, it seems because of word breaking I don't get a consistent "look". For example, if I had a 150 character word in one cell it would stretch the table column way out of "wack". Is there an intelligent way to format a column of table cells or maybe a way to break long words to get a consistant look in that column. Either via CSS, HTML or PHP?
Thanks
$table_content = substr($full_content, 0, 170);
With that I am selecting the first 170 characters of content which I then put into the table cell with the link "...more" tagged onto the end - which links to a specific detail page for that record.
My question is I want to try and format this column of cells. Even though I'm putting in the same number of chars into each table cell, it seems because of word breaking I don't get a consistent "look". For example, if I had a 150 character word in one cell it would stretch the table column way out of "wack". Is there an intelligent way to format a column of table cells or maybe a way to break long words to get a consistant look in that column. Either via CSS, HTML or PHP?
Thanks