table formatting: aligning text in columns

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

table formatting: aligning text in columns

Post by bonnie »

How do I efficiently align text in a table column?
For example I want some columns to be left-aligned and others to be center-aligned in the same table.
I know I can do this for each individual cell with paragraph tags that have different text-align attributes, but I'm looking for a way to select all the cells in a column together so I can change them all at the same time. I have many tables to format, and I need an efficient way to do the aligning.

I am using a TableStylesheet for the tables. I've tried using a generic style class to change alignment, since this allows me to apply the class to all the cells in a column, but when I do that I'm overriding the border and padding properties of the cells set in the TableStyleheet.
Could someone tell me which attributes I need to set in my generic class to match the attributes of my TableStylesheet, so that when I override the TableStyle, I'm overriding it with border and padding properties that match the default TableStyle?

Thanks very much for help with this.
Bonnie
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: table formatting: aligning text in columns

Post by LTinker68 »

If you don't specify any alignment properties in the table stylesheet, then you can either adjust the text alignment using inline styles or using generic or td-specific styles. To use inline styles, open the topic containing the table, select all the cells in the column that you want to adjust, then click the appropriate text alignment icon in the formatting toolbar. If you don't want to use inline styles (it's better if you don't), then create a generic or td-specific class and set its text-align property to whatever alignment you want. Then again, open the topic and select the styles you want to apply the formatting to, then click the class you created from the Styles pane or the styles drop-down menu.

You can put the generic or td-specific style in the main stylesheet.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: table formatting: aligning text in columns

Post by bonnie »

Thanks, Lisa!!

I found that what works best for me is to unbind the text in the table cells from the paragraph tags, then use the inline alignment since I can easily select all the cells in the column and apply it. (This works well for single-paragraph cells, anyway.)

I was struggling for quite some time trying to figure this out.

One more question: Is there any fast way to unbind all the paragraph tags in a table? (rather than to select each paragraph block > Edit > Unbind?)

Thanks,
Bonnie
Last edited by bonnie on Fri Jun 20, 2008 4:23 pm, edited 1 time in total.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: table formatting: aligning text in columns

Post by LTinker68 »

bonnie wrote:One more question: Is there any fast way to unbind all the paragraph tags in a table? (rather than to select each paragraph block > Edit > Unbind?)
Can't think of one off the top of my head (don't have Flare open at the moment to try it). You could do a find-and-replace in just that topic and have it replace <td><p> with <td> and </p></td> with </td>. (Make sure you tell it to look in the source code.) If you're using a table stylesheet then it would be more complicated, because there's more code in the <td> tag, in which case you'd need to use wildcards in the find-and-replace.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
pdenchfield
Propellus Maximus
Posts: 574
Joined: Tue Oct 03, 2006 7:56 am
Location: Seattle, WA
Contact:

Re: table formatting: aligning text in columns

Post by pdenchfield »

Hello all you Flare gurus,

How do you apply a td-specific class to table cells without losing the border properties that come from the table style sheet?

I'm assuming the td-specific class is in the regular (non-table) style sheet. Classes from the table style sheet are not available from the Styles menu or elsewhere that I could find, without going into the internal text editor and manually typing in the class names.
Post Reply