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?
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
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'.
If I try some SQL with the FORMATWIKI approach, I also do not seem to get the relevant data I would expect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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;}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.