Extra column in tables in html

This forum is for all Flare issues related to styles, stylesheets and XML.

Extra column in tables in html

Postby Ellu on Wed Sep 22, 2021 2:43 am

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>
Ellu
Propeller Head
 
Posts: 11
Joined: Fri Jan 08, 2016 3:46 am

Re: Extra column in tables in html

Postby Dave Lee on Wed Sep 22, 2021 5:55 am

For anyone reading, this question has already been answered in the Slack channel.
https://madcapflareusergroups.slack.com ... 7205199100
Dave Lee
Master Propellus Maximus
 
Posts: 6027
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Extra column in tables in html

Postby ChoccieMuffin on Mon Sep 27, 2021 4:09 am

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 2019r1 and 2021 latest.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2500
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Extra column in tables in html

Postby Nita Beck on Mon Sep 27, 2021 5:42 am

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
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3463
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Extra column in tables in html

Postby Ellu on Wed Sep 29, 2021 10:42 pm

The solution with "myrow" worked!
Ellu
Propeller Head
 
Posts: 11
Joined: Fri Jan 08, 2016 3:46 am


Return to Styles, Stylesheets and XML

Who is online

Users browsing this forum: No registered users and 6 guests