Click to See Complete Forum and Search --> : Formating text like Quark Xpress??


Perfidus
11-24-2004, 01:36 PM
I wonder how to, maybe I'm just a dinosaur because I'm still using Html, but it should be a way to make my text (it comes from database by PHP query) to fit in the space given for it.
Not that easy, what I mean:

Let's say I have the following space for txt, if
I drop it directly from DDBB it will make a mess
with my tables, should be nice that if it doesn't
feet it automatically goes to second table, and so on.
Do I explain myself?
Has anybody seen an example on something similar somewhere?

--------------|
FOTO | TEXT |
--------------|
TEXT | FOTO |
--------------

DJsAC
11-26-2004, 03:16 AM
you could use the wordwrap() function in php
check the height of the table, check the height of the text (in pixels)
then divide the height of the table by the height of the text, calculate howmany rows of text you have, and then cut the text into strings accordingly.
Then echo those strings into tables in the html page :)