Cell borders

This forum is for all Flare issues not related to any of the other categories.
Post Reply
WAW
Jr. Propeller Head
Posts: 6
Joined: Fri Jul 11, 2008 5:20 am

Cell borders

Post by WAW »

Hi, I am evaluating Flare and I ran into a problem.

I have created a table that contains a list.
It is made up of three columns.
The fist contains an image (a custom made bullet with a number in it).
The second sometimes contains an informational icon.
The third contains some text.
I use left and right Padding of 10 pixels for all fields.

What I want to do is to draw a border around some rows. I think this should be very easy to do so it is probably something I am overlooking. I only want an outline for the complete row, not the two vertical lines around the middle cell. When I select table properties, it outlines the complete table (as expected). But when I use Cell properties it draws an outline around all cells including the central cell. The only way I can find is selecting each individual cell and setting the border properties one at a time.
There must be an easier way to do this.

Another problem I ran into is that when I insert a row, the padding settings are discarded. The cell settings of the selected cells are not copied to the inserted cells. When I select multiple rows (because I want to insert multiple rows) and select insert it only inserts one row.

Can someone please help me with these basic tasks and point out the obvious :wink:
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Cell borders

Post by NorthEast »

WAW wrote:What I want to do is to draw a border around some rows. I think this should be very easy to do so it is probably something I am overlooking. I only want an outline for the complete row, not the two vertical lines around the middle cell. When I select table properties, it outlines the complete table (as expected). But when I use Cell properties it draws an outline around all cells including the central cell. The only way I can find is selecting each individual cell and setting the border properties one at a time.
There must be an easier way to do this.
Hmm... I'm not sure there is an easy way to do this. I thought you'd be able to apply a border to the row tr tag (by using a class of tr, or by formatting it inline), but borders don't seem to work on the tr tag.
DocNiNjA
Jr. Propeller Head
Posts: 9
Joined: Thu Mar 01, 2007 7:18 am
Location: Boston, MA

Re: Cell borders

Post by DocNiNjA »

Yeah you can't apply that style at the tr level for some reason. It might be slightly more work, but you could just create three td classes. As an added benefit, you can easily apply these in the WYSIWYG (which doesn't display tr elements).

Code: Select all

td.left_border {border-left: 1px solid black; border-top: 1px solid black; border-bottom: 1px solid black;}
td.center_border {border-top: 1px solid black; border-bottom: 1px solid black;}
td.right_border {border-right: 1px solid black; border-top: 1px solid black; border-bottom: 1px solid black;}
Jumping over an office building near you.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Cell borders

Post by Andrew »

A couple of things:

1) In response to your primary question, I think the easiest way to do it would be to create a <td> class that adds top and bottom borders. That way, you merely apply the class to all the cells you want to change, and that is much easier than manually editing each border.

2) As for your table not maintaining padding when you come to a new row: this is by design. Basically, it sounds like you are using "in-line" style formatting (i.e., you are formatting individual elements of the table, rather than applying style classes). Programs like Word make certain assumptions about what you want to do when you create a table with a certain kind of formatting. Flare does not make those assumptions, and so you must either reapply your formatting to every new row, or you must create style classes and apply those. OR, you can create what is called a table style. This is a way to build a table in Flare so that it makes assumptions -- you build in the assumptions.

To create a table style, go to Table > Insert > Table, and then from the Insert Table dialog, select Add from the Table Style area. Name your table style and click OK, then click OK again to exit the dialog. This will create a new table (which you can then delete if you didn't need it), and it will also add a new CSS to your project under Resources\TableStyles. In the Content Explorer, navigate to this folder and double-click the .css file you just created. This will open the TableStyle Editor, where you can create your table style. For more information on this, look up TableStyle Editor in the online help.

Best Practice Advice:
I have found that, in most cases, it is better in the long run (and usually in the short run!) to use styles and style classes to set and adjust the formatting of my document elements. This usually makes it easier to apply styles the first time, and saves a *tremendous* amount of time down the road, if you want to change the way all of a particular element appear.
Flare v6.1 | Capture 4.0.0
WAW
Jr. Propeller Head
Posts: 6
Joined: Fri Jul 11, 2008 5:20 am

Re: Cell borders

Post by WAW »

All thanks for your replies.

To solve my problems I am trying to understand the "styles" and "classes".
I have created a MyTable.ccs table style and set the desired properties (padding).
Now I need to apply this table style to an existing table.
When I select the table properties and then select MyTable style, the text still has a padding of zero. Also when I insert a row, the padding of the new row is zero.

How do I apply a style and what is the easiest way to create/edit and apply classes?
I am starting to read the manual chapters about this now (so I probably find out myself) but I would like your opinion/experience as a user.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Cell borders

Post by Andrew »

Applying table styles is usually most effective only once you have removed all "inline" formatting. To so do:

- Click inside one of the table cells. A Table bar will appear to the right side of the table.
- Click the Table bar. A shortcut menu pops up.
- From the shortcut menu, click Select. This will highlight the entire table.
- From the Text Formatting toolbar (at the top of the screen), click the Unformat button (this button looks like a capital "B" with a red "X" through it). This will remove all styles from the table.

You can then select Table Properties from the Table shortcut menu (the shortcut menu from step 2 above), and select your table style from the Table Style area.

Hope that helps,
Andrew
Flare v6.1 | Capture 4.0.0
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Cell borders

Post by NorthEast »

How would you set up classes for td and use them with a table formatted using a table stylesheet?
If you format/edit a table using a table stylesheet it will apply it's own td classes to the cells, overwriting anything you've applied manually.

You could set up your own td classes, but you'd need to use them with a table that doesn't use a table stylesheet.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Cell borders

Post by Andrew »

Dave Lee wrote:How would you set up classes for td and use them with a table formatted using a table stylesheet?
If you format/edit a table using a table stylesheet it will apply it's own td classes to the cells, overwriting anything you've applied manually.

You could set up your own td classes, but you'd need to use them with a table that doesn't use a table stylesheet.
Depends on how regular the border variances are. If they are regular, one could use the table styles dialog to set up a regular pattern.

If they are not regular, you may not be able to use a table style, and you may instead have to use <table>, <td>, <tr>, etc. classes.
Flare v6.1 | Capture 4.0.0
WAW
Jr. Propeller Head
Posts: 6
Joined: Fri Jul 11, 2008 5:20 am

Re: Cell borders

Post by WAW »

Andrew wrote:
You can then select Table Properties from the Table shortcut menu (the shortcut menu from step 2 above), and select your table style from the Table Style area.
When I select the Table style, nothing seems to happen. The padding (that is set in the MyTable.css, I checked) is not applied to the table. Do I need to 'apply' this in a special way? (ps. padding is the only thing I have set for the .css)

Thanks a lot for all the help.
WAW
Jr. Propeller Head
Posts: 6
Joined: Fri Jul 11, 2008 5:20 am

Re: Cell borders

Post by WAW »

OK, found out what caused my problem.
My table style did not contain any row patterns and column patterns.
I am not using any patterns so I figured that I could remove all the patterns.
This caused the padding properties not to work anymore.

I think this is strange behavior because I don't use any of the pattern properties, so why should I still need patterns to be able to work with padding?
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: Cell borders

Post by i-tietz »

Hi WAW,
I think that's easy:
Generate a table style, let's say "Lines around row":
1. Table / Insert Table => Windows Insert Table
2. Tab Basic, Group Table Style, Button Add => Window Select Table Style Template
3. List Templates: Select Basic
5. Field New Style Name: Lines around row
6. Button OK => Window Select Table Style Template closes
6. Button OK => Window Insert Table closes

Then edit the table style:
1. Put focus in table somewhere
2. Table / Table Style / Edit Style
3. Tab Columns, Group Pattern Properties, Field Separator: Click on little triangle
4. Field Length: Click on little triangle
5. Chose (default)
6. Click OK
7. Tab General, Group Cell Padding: Click on the little triangle right of the list of the four settings
8. Write 10 into the bottom left field
9. Click OK

That's it! You have the lines around rows only and you have the required padding ... it works for me - should work for you.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Cell borders

Post by LTinker68 »

WAW wrote:I think this is strange behavior because I don't use any of the pattern properties, so why should I still need patterns to be able to work with padding?
You need at least one row pattern and one column pattern, even if you don't make any changes to them.

With one row pattern and one column pattern, you're controlling the appearance of the whole table (except headers and footers) as opposed to controlling even rows versus odd rows and so on. So leave one pattern in both the row and column and set the styles you want.

However, I recommend only using the table stylesheets if you're going to alternate rows or columns or have a footer row. If you're not doing any of those, then use a simple table and adjust the basic table tags (table, th, tr, td, etc.) in the main stylesheet.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Post Reply