Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   PHP (http://www.programmingforums.org/forum29.html)
-   -   Newspaper sytle double-column (http://www.programmingforums.org/showthread.php?t=15641)

Logical1 Apr 17th, 2008 1:31 PM

Newspaper sytle double-column
 
Hello
You have all seen the newspaper-style multi columns in MS Word or other text editors.
Does anyone know of a solution for this in PHP when printing?

On the web page I can simply make a table and put everything in two columns easily. But when it is printed the print order is not correct becasue what was seen in a single long page (web) will be divided into 3 or four pages and order of material in the columns will not be correct.

Any ideas?
Any suggestions is appreciated.
Logical1

Ooble Apr 17th, 2008 3:37 PM

Re: Newspaper sytle double-column
 
The CSS 3 specification has support for multi-column output. However, it's still a working draft, and therefore not officially sorted. In general, I'd recommend using CSS for styling, not tables, as while it's a bit more complicated, it's also a lot more flexible.

Try Googling "CSS columns" and finding the guide that suits you best. There's a fair amount of them. I'd also recommend testing them in all relatively recent versions of IE (5+), as some won't work correctly due to IE's horrible support for anything CSS.

grimpirate Apr 17th, 2008 9:41 PM

Re: Newspaper sytle double-column
 
I suggest the following resources in terms of CSS for what you want to achieve, as what Ooble said holds, it isn't a PHP problem.
http://www.456bereastreet.com/lab/de...slayout/2-col/
http://www.maxdesign.com.au/presentation/page_layouts/

Logical1 Apr 20th, 2008 11:04 PM

Thank you but ..
 
Thank you guys for your kind answers, but I don't think I explained the issue well.

I am working on a little program that recieve data from PHP forms and saves it in MySQL database. These data can be seen and edited in other pages (so far so good).
Problem is that I want to add a function that when the user clicks on a button the page is send to MS Word or PDF file (here we are starting the problematic part).
My insane friend/client ($300 project) wants to see these exported material in two columns!
Problems are:
1. I have made a RTF file and can send the data there (by replace method). but when there is no value I can not get rid of empty rows.
2. I can't find anyway to arrange the material in two columns because I do not know the length of paragraphs.

If anyone can offer any solutions or ideas next time you pass by Canada drop me a line and a very healthy lunch and drinks are on me. Also if anyone wants to participate to do this on a fee, that is welcome too. Let me knwo your fee.
God save you all from illogocal clients and never (I do mean never take a friend as a client! or vise versa)


All times are GMT -5. The time now is 4:21 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC