Table Header Not Lining Up with Table Row

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
JenniferR
Propeller Head
Posts: 76
Joined: Tue May 12, 2009 2:07 pm
Location: California's Central Valley

Table Header Not Lining Up with Table Row

Post by JenniferR »

Hi all,
When I create a table, the column lines in the header row appear slightly to the left of the body column lines. I assume this is a setting that I've set up incorrectly in my style sheet, but I can't figure out how to fix it. Is anyone familiar with this issue?

Here's what my table looks like:
table header lines.png
I have a few different table styles in this project and I'm not having that trouble with the others.

Thanks in advance for any help you can offer,
You do not have the required permissions to view the files attached to this post.
Jennifer

"Whenever you find yourself on the side of the majority, it is time to pause and reflect." -- Mark Twain
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Table Header Not Lining Up with Table Row

Post by LTinker68 »

Generally, heading rows are in a <th> tag and content cells are in a <td> tag. You probably have different padding values specified for the tags and/or you might have a paragraph inside a content cell, for example, that has its own margin and padding values, so the paragraph inside the content cell results in additional spacing that the header cell doesn't have. You'd have to post the table's page code for us to tell if there are paragraphs in the cell and post the th/td style definitions for us to see what's affecting them.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
JenniferR
Propeller Head
Posts: 76
Joined: Tue May 12, 2009 2:07 pm
Location: California's Central Valley

Re: Table Header Not Lining Up with Table Row

Post by JenniferR »

Hi Lisa,
Will this do the trick?
headercolumn1.png
CodeSheets_css.png
You do not have the required permissions to view the files attached to this post.
Jennifer

"Whenever you find yourself on the side of the majority, it is time to pause and reflect." -- Mark Twain
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Table Header Not Lining Up with Table Row

Post by LTinker68 »

Well, first of all, there is a slight font different between the th and td tags (10pt vs 9pt). That might take care of part of the spacing.

However, the stylesheet and td/th classes in the code-behind look like you're using the main topic stylesheet for the table, but it's referencing a table class. You can set padding in the table stylesheet as well. The code for a table stylesheet is usually more complex, so you might not want to paste that here, but you could look through the front-end GUI to see if you specified padding there as well. I don't see much in the table display that would require a table stylesheet (e.g., you're not using alternate row colors), so you could try just removing the table stylesheet reference from the Table Properties screen and see if that resolves the issue.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
JenniferR
Propeller Head
Posts: 76
Joined: Tue May 12, 2009 2:07 pm
Location: California's Central Valley

Re: Table Header Not Lining Up with Table Row

Post by JenniferR »

Hi Lisa,
A couple of questions if you don't mind. (Caveat: they are probably going to sound very elementary and lame, but that's just where I'm at right now.)

First of all, I don't know how to insert a table without selecting a table style. Each time I go to Table>Insert>Table, I see the dialog box that force me to select a table style. If I select default, it still puts in a table style. So, how would I go about not using a style for this table?

Secondly, I'm not sure what I did when messing around with my table, but now the text editor shows me this when I try to see which th and td styles I'm using:

<table style="width: 100%; mc-table-style: url('../Resources/TableStyles/RegularFont.css'); margin-left: auto; margin-right: auto;" class="TableStyle_RegularFont" cellspacing="0">
<col />
<col />
<col />
<col />
<thead>
<tr>
<th class="TableStyle_RegularFont_Head_0_0_RowSep_ColSep">Data Needed</th>
<th class="TableStyle_RegularFont_Head_0_0_RowSep_ColSep">Character Spaces</th>
<th class="TableStyle_RegularFont_Head_0_0_RowSep_ColSep">Character Type</th>
<th class="TableStyle_RegularFont_Head_0_0_RowSep_ColEnd">File Position</th>
</tr>
</thead>

I don't know what these lengthy th classes are. I assume they are there because I'm using a table style, but how can I override these and just put my plain old th/td styles in?

Thanks.
Jennifer

"Whenever you find yourself on the side of the majority, it is time to pause and reflect." -- Mark Twain
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Table Header Not Lining Up with Table Row

Post by LTinker68 »

JenniferR wrote:First of all, I don't know how to insert a table without selecting a table style. Each time I go to Table>Insert>Table, I see the dialog box that force me to select a table style. If I select default, it still puts in a table style. So, how would I go about not using a style for this table?
Make sure you're selecting (default) and no Style Class. That will give you a basic table and will then use the table, th, td, etc., styles from your topic stylesheet. If you've already styled those tags, then you'll see the styles applied immediately.
JenniferR wrote:<table style="width: 100%; mc-table-style: url('../Resources/TableStyles/RegularFont.css'); margin-left: auto; margin-right: auto;" class="TableStyle_RegularFont" cellspacing="0">
If you see a reference to something in the TableStyles folder, then the table is using a table stylesheet, not using the styles in the topic stylesheet. Go back to the Table Properties screen (not the Table Stylesheet Editor) and switch the table to using (default) and not a table stylesheet.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
JenniferR
Propeller Head
Posts: 76
Joined: Tue May 12, 2009 2:07 pm
Location: California's Central Valley

Re: Table Header Not Lining Up with Table Row

Post by JenniferR »

Lisa,
You are the queen. Seriously.
Thanks for the taking the time to spell those things out for me.

:D
Jennifer

"Whenever you find yourself on the side of the majority, it is time to pause and reflect." -- Mark Twain
Post Reply