Applying styles to table cells

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
richt
Propeller Head
Posts: 42
Joined: Wed Nov 28, 2018 6:38 am

Applying styles to table cells

Post by richt »

My firm uses a particularly bloated css, which means that for tables its not uncommmon to get a cell with a class like:

Code: Select all

<td class="TableStyle-Large_Table_Column_Headers-BodyD-Column1-Body1">
However, occassionally I'd like to apply a second style to rows or cells, like:

Code: Select all

style="background-colour: Tomato;"
At present I've been adding these colors manually, which makes me feel as dirty as if I'd used inline formatting. Is there any way of adding additional styles to an existing class? I tried creating generic classes in the css editor and then adding them via the Styles tab, but that just overwrote the existing class with the generic one and the table cell/row lost all of its other formatting.
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Applying styles to table cells

Post by Nita Beck »

From the first code example, I can see that your project has a table stylesheet called Large_Table_Column_Headers. What I would do to achieve your goal is to extend that table stylesheet to include a column called Tomato (or whatever) that has the particular background color you’re after. Define the new column style as a custom column rather than pattern column. Then, in the table, select the column and apply the new custom column style to it.

BTW, if you use mediums in your regular stylesheet, the same mediums are available in the table stylesheet, too. Be sure to define the new column for all the mediums.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Post Reply