Extra column in tables in html

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Ellu
Propeller Head
Posts: 11
Joined: Fri Jan 08, 2016 3:46 am

Extra column in tables in html

Post by Ellu »

I probably have a style/stylesheet problem with some of my tables. I have tables with three columns. However, in html output there is a fourth, empty column first in the table. When you look at the xml, can you tell me what I should change to get rid of it?

<table style="margin-left: 0;margin-right: auto;" class="tablegrid">
<colgroup>
<col style="width: 37.5%;" />
<col style="width: 25%;" />
<col style="width: 37.5%;" />
</colgroup>
<thead class="thead" style="text-align: left;">
<tr class="row">
<th class="entry cellrowborder" style="vertical-align: top;"> Account</th>
<th class="entry cellrowborder" style="vertical-align: top;">Debit</th>
<th class="entry cellrowborder" style="vertical-align: top;">Credit</th>
</tr>
</thead>
<tbody class="tbody">
<tr class="row">
<td class="entry cellrowborder" style="vertical-align: top;" headers="d1289138e202"> Specific expense account</td>
<td class="entry cellrowborder" style="vertical-align: top;" headers="d1289138e205">Amount</td>
<td class="entry cellrowborder" style="vertical-align: top;" headers="d1289138e208">0.0</td>
</tr>
<tr class="row">
<td class="entry cellrowborder" style="vertical-align: top;" headers="d1289138e202"> Reclassification account</td>
<td class="entry cellrowborder" style="vertical-align: top;" headers="d1289138e205">0.0</td>
<td class="entry cellrowborder" style="vertical-align: top;" headers="d1289138e208">Amount</td>
</tr>
</tbody>
</table>
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Extra column in tables in html

Post by NorthEast »

For anyone reading, this question has already been answered in the Slack channel.
https://madcapflareusergroups.slack.com ... 7205199100
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Extra column in tables in html

Post by ChoccieMuffin »

I am not allowed to look at Slack (because "Security") so could you please post the answer in the forums too? Thanks.

I'm guessing it's because the three specified columns don't add up to 100%, but would be good to know if it's something else.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Extra column in tables in html

Post by Nita Beck »

ChoccieMuffin wrote:I am not allowed to look at Slack (because "Security") so could you please post the answer in the forums too? Thanks.

I'm guessing it's because the three specified columns don't add up to 100%, but would be good to know if it's something else.
I'll copy-and-paste in the whole Slack conversation (sans original post, as it's the same as what's here).

Dave Lee 5 days ago
I'd guess the problem is that you're using class="row" . The row class name is already used in the Foundation CSS, which is a framework that Flare uses for HTML5 outputs.
If you inspect the output using browser F12 tools and select a table row, you'll see Foundation is adding formatting for the class row.
Since you can't change this, then I'd suggest using a different class name to row in your CSS.
:+1:
1


Elina Koskela 5 days ago
Ok... any suggestions what this class name could be?

Niels von Wowern Fanøe 5 days ago
Any legal css class name. myrow, for instance.

Elina Koskela 5 days ago
Thanks guys!

Daniel Lemke 5 days ago
What are you doing to the table with that class? Row as a class name doesn't really tell you anything new if you're always only applying it to a table row. So, when you pick a new name, consider using something that tells a writer why they would select that class to apply. I prefer names that describe the content within rather than tell what the css is doing because the latter may change down the road.
For tables rows, I rarely have an applied class, but I do have one called subheader-row, which we use for complex tables that have headers beyond just the first row.

Dave Lee 5 days ago
Also, if you always need to apply these classes to all tables of this type (table.table), then you don't actually need to use classes at all. It could be set up automatically in your CSS, e.g.
table.table tr
{
/* whatever styles you need for all rows in the table */
}
Same applies for .row, .thead, .tbody, .entry.cellrowborder (edited)
:heavy_plus_sign:
2


Daniel Lemke 5 days ago
Also, likely that the class of table on the table is unnecessary. Is this one of Flare's table styles?

Elina Koskela 4 days ago
This really makes me see that I understand nothing about table styles...

Dave Lee 4 days ago
@rockandrollbot No, it's not using a Flare table stylesheet, as the table tag in the HTML would have a link to the table stylesheet CSS file.
These look like styles/classes that are being manually applied.
:+1::skin-tone-2:
1
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Ellu
Propeller Head
Posts: 11
Joined: Fri Jan 08, 2016 3:46 am

Re: Extra column in tables in html

Post by Ellu »

The solution with "myrow" worked!
Post Reply