Split rows giving a little extra

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
MadKiwiCap
Jr. Propeller Head
Posts: 5
Joined: Tue Oct 04, 2022 8:10 pm

Split rows giving a little extra

Post by MadKiwiCap »

Split rows.png
Whenever I split a row to look like A, it leaves me with this little extra line B.

What is the reason this is happening and how do I solve it?

This is the code
Split rows code.png
Does the 'padding' in the code have anything to do with it?
You do not have the required permissions to view the files attached to this post.
robdocsmith
Sr. Propeller Head
Posts: 213
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Split rows giving a little extra

Post by robdocsmith »

I'd say the padding isn't affecting anything. This is just a bit of local formatting to remove any cell padding that may already exist.

The lines you're seeing are probably because you're inserting a table inside another table, so whatever styling (cell borders etc) exists on the default table style will be doubled on the inserted table. This is the default behaviour when splitting a cell. Logically, when asked to split a cell, Flare doesn't know the structure of the rest of the table, so it does the best it can to provide the additional cells you need by putting in a sub-table.

To remove the extra borders, you could apply a table style to the inserted table that didn't include borders.

If it were my table I'd split the row using a rowspan. So the B row would like something like:

Code: Select all

<table>
  <tr>
    <td rowspan="2">Figure8</td>
    <td rowspan="2">Mainline brake state</td>
    <td>Cell in col 3 - row 1</td>
    <td>Cell in col 4 - row 1</td>
  </tr>
  <tr>
    <td>Cell in col 3 - row 2</td>
    <td>Cell in col 4 - row 2</td>
  </tr>
</table>
So for the second row of Figure 8, you don't need to include <td>s for the first two columns - they're already spanned from the first row.

Rowspan and Colspan can get confusing from looking at the code.

My preferred way of splitting a cell is to merge instead of splitting. Like you would to achieve the same result in an Excel spreadsheet. First add as many rows as you need for the content in the rightmost column. Then merge the cells in the left columns to match the rest of the table.
For example, to add a row like B into your table:
  • Insert two new rows into your table.
  • Highlight the first column cells for the two rows and merge them.
  • Then highlight the second column cells for the two rows and merge those.
MadKiwiCap
Jr. Propeller Head
Posts: 5
Joined: Tue Oct 04, 2022 8:10 pm

Solved: *Workaround* Split rows giving a little extra

Post by MadKiwiCap »

Thanks Rob

I don't really use workarounds, but when I do, it's got to do with tables. :)

Thank you for the information. I tried it and it works perfectly as described.
Post Reply