arggggg tables

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
jbean
Propeller Head
Posts: 44
Joined: Wed Aug 29, 2007 8:07 am
Location: Cape Cod

arggggg tables

Post by jbean »

my tables look great in the WYSIWYG, but when i do a preview, or build, the font is all screwy and the padding in the cells is gone.

i checked the print medium for the td styles and they are the same as for the non-print.

any thoughts on why my tables get corrupted ?

thanks
mattbnh
Sr. Propeller Head
Posts: 110
Joined: Tue Feb 26, 2008 12:17 pm
Location: Home: NH --- Compensated Servitude: MA
Contact:

Re: arggggg tables

Post by mattbnh »

The XML editor is not WYSIWYG. Given that you haven't provided much detail, that is the best general reply I can come up with for you. Preview is there because it is needed.

That said, Preview also has limitations (like not applying conditions) so really the only thing you can do is build and scrutinize, and look at the actual html to try to discern what Flare thinks you want it to do.

This is not a criticism of Flare, per se. Flare is enormously flexible and sometimes when we expect Flare to be able to handle every wrinkle we think of the way we expect, it doesn't. I sometimes think we are asking too much.

One thing that can happen is that if you have table cells that do not have a <p> style applied and you type into them, the font looks ok but the cell is actually not styled to your appropriate <p> style for the table. The text is styled based on the settings for <TD> in your CSS stylesheet, including the padding and font settings.

There could be other things going on, but I can't tell unless you paste in CSS or html or images.

My past experience is that not all of the things you can specify in a table stylesheet are actually applied correctly when you insert a table based on the stylesheet. But I can't tell from your post if you are using a table stylesheet.
jbean
Propeller Head
Posts: 44
Joined: Wed Aug 29, 2007 8:07 am
Location: Cape Cod

Re: arggggg tables

Post by jbean »

if i just insert a table and use the default table style, a table is created with no border lines (in or out). the cells are tagged td and when you type in text there is zero margin around the text. hard to believe this supposed to be a useful table style. are there other default styles you can access ?

i created my own style (attached) with padding and visible borders. when i create that and type text, it is tagged td.Table Style. IF havign the text tagged as p will fix the output issue, how do I get the text in the table tagged as p ?
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: arggggg tables

Post by ccardimon »

I love the title of your thread. My sentiments exactly.
Craig

Lost in Disturbia
ktbCA57
Sr. Propeller Head
Posts: 483
Joined: Wed Feb 04, 2009 7:45 am

Re: arggggg tables

Post by ktbCA57 »

I have similar issues... and was just about to post a question regarding table styles.. i'm on here all the time begging for help... and it seems that the solutions are not always very consistent.. but at least i've learned several things to check when having style (and particularly table) issues...

I SO FEEL YOUR PAIN...

in the meantime.. here are a couple of issues similar to jbeans's:

1) I set a cell class that is appearing one way in the editor and another in the preview... WHY? see attached capture...

2) alignment of text is sometimes off... not sure what causes that when i set "right alignment" everywhere i can think of in a table.. it still left aligns..so i have to jury-rig it in various ways to get it to go right.. seems that XML forces me to do things differently each time... even tho i look thru all the same settings.. they all look the same.. the way the text or item appears in the preview or built project is NOT the way it is set up in XML... i know.. again.. it's me.. but why is this so hard to figure out... ????

3) Also.. why do cells suddenly change from td to th tags... and how the heck to i get them back to td? that's another huge issue i have with Flare.. once a tag somehow gets assigned to a batch of text, i can't get it to change back.. i have to delete it all and start again.. sometimes that works... sometimes it doesn't.
You do not have the required permissions to view the files attached to this post.
mattbnh
Sr. Propeller Head
Posts: 110
Joined: Tue Feb 26, 2008 12:17 pm
Location: Home: NH --- Compensated Servitude: MA
Contact:

Re: arggggg tables

Post by mattbnh »

The first thing I would say is that I never use the TD definition for text. I put the text in a <p> style, typically one we call p.cellbody, which is actually an inheritance from Robohelp projects.

when you click in a table cell, if you press Enter, you end up with a <TD><p></p></TD> structure inside the cell. (I edited what I wrote originally this because this has changed in 4.2 or 4.2.1)

I think this is pretty consistent with the way CSS is defined to be used. I don't think CSS gurus recommend defining multiple <TD> styles to format text.

What I have seen is that the XML editor does not display <TD>text</TD> text correctly. It looks OK in the editor but when it is built/previewed the browser default font and style seems to get applied. We frequently had instances in the early Flare releases where table cells contents displayed as 12 point MS Sans serif text when the cellbody style was 8pt Verdana. The reason always was that the writer typed in the cell and the cell was <td>text</TD> rather than <td><p>text</p></td>, and forgot to check. It never happened if there were multiple paragraphs in the cell because as soon as you hit enter, both chunks of text became <p>.

With 4.2 the best way to guard against this is to select all the non heading cells and use right-click>Cell Content Style to assign the same <p> style to all cells. If you do that all your cells should start out consistently formatted, and you can apply different styles to any cell or range of cells from that point on.

I am just going by my experience, and your mileage may vary - you could be seeing a totally different symptom.

PS - In table properties you can set the number of table header rows. If you apply the settings in the dialog box and that setting is something other than you wanted, you may get extra <th> rows.

Or if you paste <th> rows into a table body, it might happen. I just tried this and ended up with a mess.

You can try changing table properties but you may end up just nuking those rows or having to go into the file with the internal text editor to hack them out of there.
jbean
Propeller Head
Posts: 44
Joined: Wed Aug 29, 2007 8:07 am
Location: Cape Cod

Re: arggggg tables

Post by jbean »

i tried doing Enter then backspace for every cell and that seems to work (hard to believe I have to go through just to create a usable table).

I tried selecting all the rows, right-click > Cell Content Style, but there were no p styles to choose in the options.

Just for kicks, I also created a new project and created a default table, which seemed to work fine. So I copied over the Basic.css file in my main project with the one from the new project. But when I created a table in there I had the same issues. Apparently something else in my project is affecting the table style. Crazy. Frustrating. Makes Word seem downright user friendly.

Anyway, I guess that klooge will get my by. Thanks
mattbnh
Sr. Propeller Head
Posts: 110
Joined: Tue Feb 26, 2008 12:17 pm
Location: Home: NH --- Compensated Servitude: MA
Contact:

Re: arggggg tables

Post by mattbnh »

Back to ktbCA57's issue with the green background text that is green in the editor and not green in the preview/build.

I can see from your snap shot that you are using a td.tablestyle_something style.

Try making a p.style with the green background and make the cell a <p>. That might give you better results.

You can try this without changing your td style - just try it on one cell and see what happens.

I was able to get this to work. But surprisingly so did a green background td style (though the font was not the same as the p style.

Is it possible you defined the td style in a different style medium than you are building and previewing with?

When I defined the td green in non-print medium by mistake, it did not show in a PDF preview. When I defined it in the default medium, it showed up green.
jbean
Propeller Head
Posts: 44
Joined: Wed Aug 29, 2007 8:07 am
Location: Cape Cod

Re: arggggg tables

Post by jbean »

another frustrating issue i have with tables is that, when viewing output, if the browser window is not wide enough, the text in a cell will wrap over itself making it illegible (rather than going to a new line).
jbean
Propeller Head
Posts: 44
Joined: Wed Aug 29, 2007 8:07 am
Location: Cape Cod

Re: arggggg tables

Post by jbean »

AHHHHHHHHHHHHHHHHHHHHHHH

when i generated print output the table ran off the right margin.

i went back to Flare and looked at the topic in Print Layout, and when I went back to Web Layout the table was completely hosed !

this is ridiculous
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: arggggg tables

Post by LTinker68 »

Are you using a table stylesheet? Although they're useful for alternating rows and colors, I found it too restrictive in other ways, so I don't use them anymore. I use the standard table-related styles (table, tr, th, td) in the main topic stylesheet. Then it's just a matter of designing how I want a particular tag to look for online output and how I want it to look for print output. It's a bit of a pain if you do want alternating styles for rows or columns because you have to apply the alternating styles manually and re-apply them if you add rows or columns, but it allows for more flexibility with merged cells and span tags or custom classes.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
jbean
Propeller Head
Posts: 44
Joined: Wed Aug 29, 2007 8:07 am
Location: Cape Cod

Re: arggggg tables

Post by jbean »

i don't need anything fancy. just a basic table with no headaches.

how do you not use a table stylesheet ? don't you have to select one when you create the table.

while we are on the subject, how do i have my table resize automatically in the browser window (so text doesn't wrap on itself) and how do i keep my tables from going outside the page margin in print output ?

why isn't that automatic in the default table style ? are there people who actually want their text to wrap on itself and their tables to go across columns ? ugh.

thanks

happy friday
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: arggggg tables

Post by LTinker68 »

jbean wrote:how do you not use a table stylesheet ? don't you have to select one when you create the table.
You don't have to select a table stylesheet. If you leave it at default then it won't use a table stylesheet at all, so there's no reference to a table stylesheet file in the topic header, so it'll use whatever stylesheet is declared in the header. So if you only have one stylesheet, period, then that's where it'll look for the styles. (And if you don't declare any table-related styles in that stylesheet then it'll use the default values for them.)

jbean wrote:while we are on the subject, how do i have my table resize automatically in the browser window (so text doesn't wrap on itself)
If you set the table width to 100%, then it'll automatically fill the available space in the online output. However, IE may not dynamically resize the table if you modify the browser window. Or maybe it's DIVs that it won't dynamically size and tables are fine. Can't remember.
jbean wrote:how do i keep my tables from going outside the page margin in print output ?
So in the default medium, set the width attribute on the <table> tag to 100% and in the print medium, set the width attribute on the <table> tag to 6 inches, or whatever space you have available between the margins.

jbean wrote:why isn't that automatic in the default table style ? are there people who actually want their text to wrap on itself and their tables to go across columns ? ugh.
Not sure what you mean by that. Are you talking about text wrapping inside a cell, or the table resizing and its text resizing as a result? Text should wrap automatically if the cell size shrinks. That's the default behavior. The only reason it wouldn't is if A) you set the white-space attribute to nowrap on one of the relevant tags, or B) you have hyphenation turned off and you have a long string of text and it can't figure out where to break the text to wrap it. Even then, at some point the text will wrap, but it'll stretch the width of the cell as wide as it can to avoid that, which could result in all the other columns being extremely skinny.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
ktbCA57
Sr. Propeller Head
Posts: 483
Joined: Wed Feb 04, 2009 7:45 am

formatting cells - arggggg tables

Post by ktbCA57 »

jbean wrote:I tried selecting all the rows, right-click > Cell Content Style, but there were no p styles to choose in the options.
this was my experience also!

but then....
mattbnh wrote:when you click in a table cell, if you press Enter, you end up with a <TD><p></p></TD> structure inside the cell. (I edited what I wrote originally this because this has changed in 4.2 or 4.2.1)
so i tried that.. and it worked... i have found a few instances where i could use <P> settings in a table.. but i couldn't figure out why sometimes i could and sometimes i couldn't... but this helps a lot... HOWEVER... that said... and while it did HELP.. it hasn't totally solved the problem...

only a part of the cell (where the text is) is green.. i would like the green to FILL the cell... see attached...

so, Matt... you ROCK for figuring this much out... any other ideas about what i might have missed?
You do not have the required permissions to view the files attached to this post.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: arggggg tables

Post by LTinker68 »

The green color I'm assuming you applied to the paragraph tag, correct? If so, then only the area that the paragraph occupies will be green. That particular cell is extended by the content in the other cell(s) in that row, so the paragraph only takes up a small portion of its table cell. In order to have the entire cell be green, you have to set the background-color on the <td> tag, not on the paragraph tag.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
ktbCA57
Sr. Propeller Head
Posts: 483
Joined: Wed Feb 04, 2009 7:45 am

Re: arggggg tables

Post by ktbCA57 »

Yes... the background IS set on the td style... that's how it all started... i had the cell style, the td, etc.. all set for that green background.. the problem was that while it showed in the XML Editor correctly, it was not showing up with the green background (or bolded text) in the Preview or built projects... as per my earlier post...

Matt thought perhaps the <p> setting might work... it did help.. but it's still not all the way "there"...

thanks.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: arggggg tables

Post by LTinker68 »

Can you open the topic in the Internal Text Editor and post the code for that cell from the opening <td> to the closing </td> tags? And post your styles for the <td> and <p> tags that you're using in that cell?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
ktbCA57
Sr. Propeller Head
Posts: 483
Joined: Wed Feb 04, 2009 7:45 am

Re: arggggg tables

Post by ktbCA57 »

how's this?

code for cell:
<td class="TableStyle_Fields_OVRIDEindicator">
<p class="FIELDS_overridable">(End Event) Adjustment</p>
</td>


code for <td> style:
td.TableStyle_Fields_OVRIDEindicator
{
color: #000000;
font-weight: bold;
font-style: normal;
font-size: 8pt;
padding-left: 5pt;
border-left-style: solid;
border-left-width: 1px;
border-left-color: #000000;
border-right-style: solid;
border-right-width: 1px;
border-right-color: #000000;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #000000;
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color: #000000;
background-repeat: no-repeat;
background-color: #c6ffce;


code for <p> style:
p.FIELDS_overridable
{
margin-top: 0.5pt;
margin-bottom: 7pt;
font-family: Verdana;
line-height: 12pt;
background-color: #c6ffce;
font-weight: bold;
font-style: normal;
font-size: 8pt;
color: #000000;


not sure i posted these the way you requested them... but hopefully so!

Thanks!
ktbCA57
Sr. Propeller Head
Posts: 483
Joined: Wed Feb 04, 2009 7:45 am

Re: arggggg tables - YES, THERE'S HOPE!

Post by ktbCA57 »

fyi to jbean, ltinker, matt, ccardimon - and anyone else dealing (LESS THAN) successfully with tables...

i just received this from a reliable source re: formatting in tables and trying to get the formatting to "stick":

"The problem is that before generation (or preview) Flare re-applies the table Styles, thus overwriting the local Stylesheet. When we apply a class (from the Styleshet) and this changes can be seen in the XML editor, this is a bug (i.e the background color set for the td class in the local Stylesheet. The color should not be there, this is a bug) For this reason, it is a best practice to apply a Tablestyle to the topic and, all the formatting (inside the table) to do it as inline formatting."

hopefully, most of these issue will be addressed in the next update... a bug in some cases is a good thing as there is ALWAYS hope it might get fixed! YIPPEEE!!!

Just thought I'd share this little ray of hope with regard to TABLES... ARRRRRRRGGGHHH! :D :lol: :D
mattbnh
Sr. Propeller Head
Posts: 110
Joined: Tue Feb 26, 2008 12:17 pm
Location: Home: NH --- Compensated Servitude: MA
Contact:

Re: arggggg tables

Post by mattbnh »

Hi ktbCA57

I tried looking for a way to fix your table cell woes, and also to see if the reliable source was reliable (not that I truly doubted), and I think I can add something to the discussion.

First, things do seem to be the way your source described. The TD formatting disappears if you have used a tablestyle, Looking at uncompiled topics and built topics in webhelp it is plain that the style applied to the TD is overwritten by the table stylesheet settings during build and preview.

The only way that the colored cell backgrounds would work in a table stylesheet is if you were always making a column or row with a background color.

So for now it seems that the best way to solve your coloring issue is to use local color (so to speak). Not optimal if you are trying to do things with stylesheets, but it works. Here is how I would do that:

1. click in the cell four times - this should select the text and the cell background around it (I found that right clicking on the TD in the structure bar does not allow you to select it this way.

2. From the Format menu, pick Background Color. Then click on the color you want.
Save the topic and preview. You should see the whole cell with a background color that expands to fit the size of the row and column. It will survive the build and display in your target, I believe.

When you look at the html and the built topic in webhelp, you can see that two of the TD cells have been replaced. Only the local formatting survived.
local formatting
<td class="TableStyle_Format_A_Body_0_0_RowSep_ColSep" style="background-color: #adff2f;">
is unchanged
<td class="TableStyle_Format_A_Body_0_0_RowSep_ColSep" style="background-color: #adff2f;">

<td class="greenplusborders">
becomes
<td class="TableStyle_Format_A_Body_0_0_RowSep_ColSep">
resulting in no color.

I am not enough of a css guru to make a blanket pronouncement that this is a bug, because I don't know how table stylesheets fit into the cascade in the standard (if at all). My instinct is that any "local" formatting should apply after a tablestylesheet, and that happens, but I am not sure what happens when stylesheets collide. I thought it was 'last one referenced wins" and that raises the issue of whether the table stylesheet or the topic stylesheet should be applied first or last. That could be the bug.

Hope this helps.

PS - I suggest that Flare table stylers save up their ARRRRRRRGGGHHHs for International Talk Like a Pirate Day every Sept 19 and let it out all at once. See http://www.talklikeapirate.com/ (No affiliation, I just think it is funny.)
ktbCA57
Sr. Propeller Head
Posts: 483
Joined: Wed Feb 04, 2009 7:45 am

Re: arggggg tables

Post by ktbCA57 »

mattbnh wrote:I tried looking for a way to fix your table cell woes, and also to see if the reliable source was reliable (not that I truly doubted), and I think I can add something to the discussion.
Thanks Matt... i'm going to try that... will let you know if it works!

THANKS FOR ALL YOUR EFFORTS!
Post Reply