Column text that flows? (Not using table cells.)

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
JeromeR
Propeller Head
Posts: 64
Joined: Fri Mar 20, 2009 2:15 pm
Contact:

Column text that flows? (Not using table cells.)

Post by JeromeR »

What's the recommended way to display text in columns that flow? So as the height and width change, the text might reflow to re-balance the columns.

I'm not looking for a solution that uses tables.

Thanks.
shgadd
Propeller Head
Posts: 21
Joined: Thu May 09, 2013 2:32 am
Location: London, UK

Re: Column text that flows? (Not using table cells.)

Post by shgadd »

Hi JeromeR,

Have you tried using the multi-column properties in CSS3?

I used it to create a two column div for HTML5 output:

Code: Select all

div.2column {
    -webkit-column-count: 2; /* Chrome, Safari, Opera */
    -moz-column-count: 2; /* Firefox */
    column-count: 2;
}
There are other properties that can be used to control gaps etc too.
Davidg
Propeller Head
Posts: 12
Joined: Wed Sep 17, 2014 8:42 am

Re: Column text that flows? (Not using table cells.)

Post by Davidg »

This works OK for HTML5, but not for PDF output. Is there an equivalent approach to get text to flow into columns in PDF targets?
DAVID GREEN | Sepura plc | Technical Author
P: +44(0)1223 877206 | david.green@sepura.com | http://www.sepura.com
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Column text that flows? (Not using table cells.)

Post by NorthEast »

Davidg wrote:This works OK for HTML5, but not for PDF output. Is there an equivalent approach to get text to flow into columns in PDF targets?
Flare already supports using columns in page layouts.

See the help: http://webhelp.madcapsoftware.com/flare ... olumns.htm
Davidg
Propeller Head
Posts: 12
Joined: Wed Sep 17, 2014 8:42 am

Re: Column text that flows? (Not using table cells.)

Post by Davidg »

Yes, but there are two reasons this approach is unsuitable (compared with enclosing text inside a div class in the topic itself):
- text in multi-column frames on a page layout does not automatically reflow to distribute itself across the columns. (I need it to do this because content I'm presenting in column format will vary according to its conditional tagging). E.g. I want a 2-column table which contains just enough rows to contain the content visible for certain conditions.
- if I assign a 2-column page layout to a topic in the TOC, the output will create a new page; there is no way to generate, say one PDF page consisting or a mix of page layouts (1- and 2-column).

David
DAVID GREEN | Sepura plc | Technical Author
P: +44(0)1223 877206 | david.green@sepura.com | http://www.sepura.com
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Column text that flows? (Not using table cells.)

Post by NorthEast »

If the content needs to be in specific columns, and not flowing between columns, then it sounds more like a table.
So can you not format your content in a table?
Davidg
Propeller Head
Posts: 12
Joined: Wed Sep 17, 2014 8:42 am

Re: Column text that flows? (Not using table cells.)

Post by Davidg »

Possible but also suffers from this limitation:
- text in multi-column table does not automatically reflow to distribute itself into unoccupied cells. If I start with a big table and mark some of the cells (or their contents) with conditions which are hidden in that target, the result is empty or missing cells!
DAVID GREEN | Sepura plc | Technical Author
P: +44(0)1223 877206 | david.green@sepura.com | http://www.sepura.com
Post Reply