Table Excerpt Include of Table Transformer using 'Show result as plain text' will not align

Green_ Desmond
Contributor
July 13, 2024

I use a table transformer to output with the 'Show result as plain text' setting. I then wrap this into a Table Excerpt, for reuse.

I then re-use this excerpt with a Table Excerpt Include within the cell of another table, on the page(s) I want to display the output. I use this approach in numerous places, to populate data into quite a large number of cells in various pages. Below is a screenshot of one the more simple examples, where there are 4 numeric values, each coming from a Table Excerpt Include and as plain text.

I can never get the included text to align, either vertically or horizontally. If I use the typical approaches to centre the <TD> text, the table excerpt does not seem to conform. It makes my pages look a bit sloppy.

I've tried using some CSS in a HTML control within the page, but still can't get it to work. 

Any ideas or reasonably straightforward workarounds?

 Not aligning.JPG

1 answer

1 accepted

3 votes
Answer accepted
Nikita Kamai
Contributor
July 15, 2024

Hello Desmond,

Please, try wrapping this config with our Table Transformer and see if you can apply the necessary CSS in our macro instead or via SQL.

Best wishes,
Nikita

Stiltsoft team

Green_ Desmond
Contributor
July 15, 2024

I don't understand, fully. I tried the CSS in a Table Transformer wrapping the table below, but it doesn't seem to work.

Each of those Table Excert Include macros have output as ''Show result as plain text'.

Text not aligning.JPG

If I try some SQL with the FORMATWIKI approach, I also do not seem to get the relevant data I would expect.

Green_ Desmond
Contributor
July 15, 2024

Ok, I tried again and this worked better. The vertical alignment is still not right, but at least horizontal alignment is now as expected.

th {text-align: center; vertical-align: center;}
td {text-align: center; vertical-align: center;}

Green_ Desmond
Contributor
July 15, 2024

I can also see what was tending to happen is that the Table Excerpt Include macros were being wrapped within a <P> tag. Along with the CSS above in a Table Transformer macro (to wrap and be able to apply some CSS to my output table), this seems to fix the problem!

Alexey Mikhaylov _Stiltsoft_
Contributor
July 17, 2024

Hello Desmond,

Please try using the CSS below which should help with both vertical and horizontal alignment:

.table-joiner {
padding: 0;
}

p {
margin-top: 0;
}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events