Page 1 of 1

Creating Table Classes

PostPosted: Thu Sep 05, 2019 7:39 am
by Joseph Zitt
I would like to create a class within a table style that would inherit everything about the style except for specific parameters (In this case, the table margins). I can see how to select an existing class, but not how to create one. I think I've seen a "Create Table Class" item show up in the right-click menu, but haven't gotten it to appear when expected. I'm using Table Style Sheets, rather than putting the tables in the regular style sheets.

So how do I create table classes within styles? Is there something I'm not understanding about the difference?

Re: Creating Table Classes

PostPosted: Thu Sep 05, 2019 3:46 pm
by SteveS
I'm not sure I'm following.

Usually, a class contains styles, not the other way around. When you apply a class to a div or an element you are applying the styles defined within that class.

You can define a class in your stylesheet by using the following declaration:
Code: Select all
.class {
  css declarations;
}


You can apply your class to an element in your stylesheet:

Code: Select all
p.class{
  css declarations;
}


Or apply it within the page:

Code: Select all
<p class="class">This will be styled class.</p>

Re: Creating Table Classes

PostPosted: Sun Sep 08, 2019 12:16 am
by Joseph Zitt
SteveS wrote:I'm not sure I'm following.

Usually, a class contains styles, not the other way around. When you apply a class to a div or an element you are applying the styles defined within that class.

You can define a class in your stylesheet by using the following declaration:
Code: Select all
.class {
  css declarations;
}



I can see how this would apply within the general stylesheets, but what about Table Style sheets? I don't see a way to implement this within the Table Style editor.

Re: Creating Table Classes

PostPosted: Sun Sep 08, 2019 3:39 pm
by SteveS

Re: Creating Table Classes

PostPosted: Mon Sep 09, 2019 1:09 am
by Joseph Zitt


Thanks. It's good information, but not what I'm trying to figure out.

I have a Table Style that I use for the majority of my tables. I'm trying to have a version of it that is thinner and with a left margin, so it can appear among the items in a numbered list (which we use for steps in a procedure that can include tables of information) without interrupting the visual flow. Ideally, I would have a sort of child style of the usual one, so that I would only change the width and positioning. That way, any other stylistic changes to the usual table style would also affect the new one.

I would have thought that this would be easy and very common, but it's proving trickier than I thought.

Re: Creating Table Classes

PostPosted: Mon Sep 09, 2019 5:39 am
by Nita Beck
Rather than create a separate table style for tables within lists, you can nest a table inside a list item and then apply the table style you already have. Unless you’re using unusual alignments for your list items, a table within a list item will align with the list item’s content, rather than being all the way at the left margin.

I have a hunch that you may be starting and stopping your lists in order to place content underneath list items. You don’t need to do that. Check out the techniques in the following Flare topic. Even though your situation isn’t about Notes or Comments within list items, the principles are the same.

https://help.madcapsoftware.com/flare2019/Content/Flare/Lists/More/Adding-Notes-Comments-Between-List-Items.htm

Re: Creating Table Classes

PostPosted: Mon Sep 09, 2019 6:50 am
by Joseph Zitt
Nita Beck wrote:Rather than create a separate table style for tables within lists, you can nest a table inside a list item and then apply the table style you already have. Unless you’re using unusual alignments for your list items, a table within a list item will align with the list item’s content, rather than being all the way at the left margin.


Holy cow! That does indeed work. The document had been imported from Word, with the start-and-stop lists. Leaving the items within an ongoing list does position them properly. That would seem to be wrong, and I would expect it to cause errors, but it does just what I want.

I'm surprisingly pleased to have to undo a couple of days work putting in unneeded workarounds.

Thanks!

Re: Creating Table Classes

PostPosted: Mon Sep 09, 2019 5:35 pm
by Psider
Joseph Zitt wrote:I'm surprisingly pleased to have to undo a couple of days work putting in unneeded workarounds.


This made me laugh more than I probably should. Thanks Joseph. :)