I have a bunch of snippets that look all like this:
I would like to be able to insert them one after another and i'm thinking if all the columns were the same width then the column separators should line up and it would look like one big table.
However, even after specifying column widths for all 7 columns when I insert the snippets one after another the column separators do not line up (see below for example). Does anyone know why this would be?
Is there a better way I could be taking all of my individual snippets and combining them to look like one big table?
Here is the code for each snippet. ** I should add that my target output is PDF and I tried defining the column width in inches as well without success. **
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="5" MadCap:lastHeight="54" MadCap:lastWidth="864">
<head>
</head>
<body>
<table style="width: 100%;">
<col style="width: 200px;" />
<col style="width: 50px;" />
<col style="width: 50px;" />
<col style="width: 300px;" />
<col style="width: 75px;" />
<col style="width: 90px;" />
<col style="width: 200px;" />
<tbody>
<tr>
<td class="Parameters">Adaptive_Gain</td>
<td class="Parameters">REAL</td>
<td class="Parameters">Float</td>
<td class="Parameters">Surge Adapter - Gain multiplier that determines how much SCL moves to the right in response to rate of change of OP towards SCL</td>
<td class="Parameters">Read/Write</td>
<td class="Parameters"> </td>
<td class="Parameters"> </td>
</tr>
</tbody>
</table>
</body>
</html>
They are each individual tables with 7 columns and 1 row. HELP: Joining snippets together to form a table
HELP: Joining snippets together to form a table
You do not have the required permissions to view the files attached to this post.
Re: HELP: Joining snippets together to form a table
It happens that way because each row is its own table, so each table is following its internal rules for the content contained within that table. Tables only care about their content, not content of other tables in the same topic. If you need to keep the tables separate, then you need to specify the width for every column (except perhaps the last one) in every table to be the same. For example, the first column in each table is 100px or .5 inch, whatever. That's still not a guarantee that they'll line up, because a table will try to allow continuous text (e.g., a really long word) to remain as one line, unless you set the hyphenation in the table cell to break words.
Have you looked at snippet conditions? I haven't used them myself (never had a need), but from what I've read on the forums, it might provide you with what you need. It's not quite the same as regular conditions, which is what always threw me off.
Have you looked at snippet conditions? I haven't used them myself (never had a need), but from what I've read on the forums, it might provide you with what you need. It's not quite the same as regular conditions, which is what always threw me off.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: HELP: Joining snippets together to form a table
What happens if you take the style="width: 100%;" bit out of
<table style="width: 100%;">
?
I wonder if you have confused Flare by specifying column widths that add up to less than the 100% of the available table width(which, for a print target will be defined by your page layout width and the margin settings)? So when Flare tries to obey that bit, it finds it has more space to fill than specified by the column widths, so just allocates the extra space as seems best according to the text in each cell of each table?
In my experience, if I've (usually inadvertently) specified a specific column width, Flare honours that, even if the text wraps in a silly place.
<table style="width: 100%;">
?
I wonder if you have confused Flare by specifying column widths that add up to less than the 100% of the available table width(which, for a print target will be defined by your page layout width and the margin settings)? So when Flare tries to obey that bit, it finds it has more space to fill than specified by the column widths, so just allocates the extra space as seems best according to the text in each cell of each table?
In my experience, if I've (usually inadvertently) specified a specific column width, Flare honours that, even if the text wraps in a silly place.
Marjorie
My goal in life is to be as good a person as my dogs already think I am.
My goal in life is to be as good a person as my dogs already think I am.
Re: HELP: Joining snippets together to form a table
The problem would still exist. If the columns don't have a defined width, then they'll take as much space as needed to show the content in that cell. If there is a convenient place to word wrap the content and another cell in the table needs more space to display its contents, then the first cell will word wrap its contents at the best location(s). Since the content in each cell varies from table to table, the column widths won't line up from table to table, unless each column in each table is set to a defined width, and even then it might not work if content in one cell doesn't have a good spot to word wrap.Msquared wrote:What happens if you take the style="width: 100%;" bit out ...
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: HELP: Joining snippets together to form a table
But in this case, the column do have a defined width . . . Or am I missing something?
Marjorie
My goal in life is to be as good a person as my dogs already think I am.
My goal in life is to be as good a person as my dogs already think I am.
-
- Sr. Propeller Head
- Posts: 261
- Joined: Wed Apr 18, 2007 2:25 am
- Location: Nottingham, UK
Re: HELP: Joining snippets together to form a table
Try using the table-layout property, set to fixed.
Re: HELP: Joining snippets together to form a table
Oh, sorry, missed that you were referring to the original code, which had 100% table width and every column defined.Msquared wrote:But in this case, the column do have a defined width . . . Or am I missing something?
Yes, you never want to specify a table width and define the width of every column. That produces a probably conflict, because the table is set to 100% but the column widths added together may or may not match 100%. So if you define every column's width, then remove the 100% table width definition.
But as I stated before, it may still not completely honor the widths, unless you enable the option to force a word break in the cell.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.