Table Styles Mystery

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
TechWriter85
Propeller Head
Posts: 35
Joined: Mon May 13, 2019 6:37 am

Table Styles Mystery

Post by TechWriter85 »

Hello.

My company is moving from FrameMaker to Flare and Flare is new to me. I am watching the online videos, but in the meantime I need to produce actual work despite not knowing Flare well. Currently, I am mystified about this table behavior:

When I put the cursor in one row of a table, I see my ordinary paragraph styles in the Styles pane to the right. They come from our big, overall .css file.

When I put the cursor in the following row, I see the drastically limited list of styles from the table.css. I would prefer to use this .css for the tables, seems logical to me, but I don't know how to make it apply consistently to the table.

How do I get one .css style to apply consistently to a table?

Thanks.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Table Styles Mystery

Post by doc_guy »

The styles that appear are based on the tag your cursor is in. So if you have a <p> inside the <td> element, then you will see all your paragraph styles. If you have just a <td> with no paragraph, then you'll just see styles that can be applied to the <td> element (which would basically be any class you've created of TD, as well as any generic styles).

Also important to note: if you have a character/word/sentence/etc. selected, you will see inline styles (styles that can be applied via the <span> tag, or styles like the <b> and <i> tags). If you just have your mouse pointer in a paragraph or block of text, you will see styles that apply to the block. I have no idea how much you know about HTML/XML, so I'll add this in case it is helpful: If that is not a concept that is familiar to you, I recommend reading this article: https://www.w3schools.com/html/html_blocks.asp
Paul Pehrson
My Blog

Image
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Table Styles Mystery

Post by Nita Beck »

And if you’re trying to add content in a cell that doesn’t have a paragraph inside it, on the Table ribbon, look for the Cell Content Style (or something like that; I’m on my iPad at the moment), which will let you select a paragraph style; Flare will then nest a paragraph with that style applied inside the cell.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
TechWriter85
Propeller Head
Posts: 35
Joined: Mon May 13, 2019 6:37 am

Re: Table Styles Mystery

Post by TechWriter85 »

Thank you, Nita. I finally got back to this question!
I used Cell Content Style, but I find that it applies to every paragraph in a cell. I have a table that follows this pattern:

Title of Something in column 1 Definition introductory sentence in Column 2 ending in colon:
--Bulleted item 1 of definition
--Bulleted item 2 of definition
--Bulleted item 3 of definition


In the cell in Column 2, I would like to use p.CellBody for the introductory sentence, and p.CellBullet for the bulleted items under it. I can 't find a way to do this.l Can you use different styles within one table cell?

Thanks.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Table Styles Mystery

Post by doc_guy »

Once you've got the <p> tag in the cell, you can add all kinds of content, lists, etc.

If you don't have the <p> tag in the cell, just press enter. The p tag will be added automatically. Now press backspace, and you're back on the first line, but the <p> tags stays.

Now, right click on the p block in the side bar (or, with your cursor in the p block, but with nothing selected, use keyboard shortcut CTRL + SHIFT + H ) and you can apply a class of paragraph. Then insert a bulleted list.

The cool thing is that with CSS, you don't even need to create a p.CellBody or bullet or whatever. You can target paragraphs in a cell by using this in your style sheet:

td p {
property: value;
}

That will only target paragraphs that are descendant elements of the TD tag. No need to create a special class for paragraphs in cells, just target them specifically. Lists are the same thing:

td li {
property: value;
}

Or if you want to apply the style to the outside of the list (but not between the rows, for example), you could do this:

td ol, td li {
property:value;
}

Which is precisely what we have done here:

Image
Paul Pehrson
My Blog

Image
Post Reply