Applying styles to table cells

This forum is for all Flare issues related to styles, stylesheets and XML.

Applying styles to table cells

Postby richt on Tue Jun 11, 2019 3:52 am

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.
Propeller Head
Posts: 31
Joined: Wed Nov 28, 2018 6:38 am

Re: Applying styles to table cells

Postby Nita Beck on Tue Jun 11, 2019 4:17 am

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.
Content Strategist / Information Architect / Flare Consultant:
Manager, Rochester Flare User Group:
Nita Beck
Senior Propellus Maximus
Posts: 3350
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Return to Styles, Stylesheets and XML

Who is online

Users browsing this forum: No registered users and 14 guests