Problem creating a page-wide table

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
rlane
Propeller Head
Posts: 11
Joined: Fri Jul 16, 2010 9:54 am

Problem creating a page-wide table

Post by rlane »

I'm using Flare 6.1.
I'm trying to create a table for PDF output that spans the width of the page, even though the default page layout uses a body frame that is indented 1.5 inches from the left margin. I also want to use a specific table style for the table. The steps I used are:
1. Insert the table and select the tablestyle in Table Properties dialog.
2. Create a style class associated with the selected table style - the style class name is pw_Table1. The style class dialog indicates that the table style mc-table-style has a url of ../Resources/TableStyles/Table1.css, and that Styles.css is the style sheet that will be modified to add this style class.
3. In pw_Table1 that appears as a class under the table tag in Styles.css, I specify margin-left as -1.50 inches in the Box property for the style class. In otherwords, I want the table associated with this style class to be 1.5 inches to the left of the default body frame.
4. As soon as I start editing the table, messages appear indicating "Missing linked stylesheet file :///H:/project_folder/project_name/Content/Resources/Resources/TableStyles/Table1.css". The path to the tablestyle incorrectly duplicates "Resources". (I think that this is a bug.)

Has anyone else experienced a similar problem, and has anyone been successful in creating a table to span the page width while applying a specific tablestyle?

Thanks.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Problem creating a page-wide table

Post by LTinker68 »

rlane wrote:2. Create a style class associated with the selected table style - the style class name is pw_Table1. The style class dialog indicates that the table style mc-table-style has a url of ../Resources/TableStyles/Table1.css, and that Styles.css is the style sheet that will be modified to add this style class.
When you create a table stylesheet and associate it with a table, the <table> tag of that table already has a class added to it. So if your table stylesheet is called Table1.css then the table tag will have class="TableStyle_Table1" applied to it. So the pw_Table1 class won't do anything (although theoretically you're supposed to be able to apply two classes to a tag, I have yet to get it to work in Flare).

Unfortunately, there does seem to be a bug where you can't enter a negative table margin in the table stylesheet (it keeps resetting it to 0 in the editor). You can manually modify the stylesheet, but the next time you modify it using the Table Stylesheet Editor, it will blow out that negative margin.

What you need to do instead is create a table class in your main topic stylesheet (Styles.css in this case), call the class TableStyle_Table1 (the same name as what's added to the table tag), and set its left margin to -.25 in or whatever you want. The table will inherit that left margin value, even though it's not defined in the table stylesheet (it inherits it from the Styles.css stylesheet).

NOTE: Flare (still) inserts inline styles on the table tag when you insert a table, so you will need to open the topic in the Internal Text Editor and manually delete the margin-left:0 or whatever it says. (Inline styles override stylesheet styles, so you have to delete the inline style.) You might have to delete the width value, too, depending on what it's set to and if you declared a width in the stylesheet.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
rlane
Propeller Head
Posts: 11
Joined: Fri Jul 16, 2010 9:54 am

Re: Problem creating a page-wide table

Post by rlane »

That did the trick Lisa. Thanks.
For anyone else who does this - any time you change the properties of the tablestyle you are using, be aware that the "margin-left: 0" attribute is re-applied to the table. Therefore you need to re-edit the topic in the Internal Text Editor and manually delete the attribute.
Post Reply