@media print tables issues

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
WriterAndrew
Propeller Head
Posts: 50
Joined: Tue Mar 05, 2019 2:43 am

@media print tables issues

Post by WriterAndrew »

Hi, all,
I'm successfully generating some HTML5 Top Nav output, and on-screen, all appears just how I want it.

Issue 1
However, if I open a topic with tables, and then use the MadCap Print button to print, the tables in the printed output seem to disobey all width-related styling!

In my stylesheet, I have an @media print section, and I've added a tables section, as follows:

@media print
table
{
/*border: solid 1px #dcdcdc;*/
border: solid 2px orange;
border-radius: 8px;
border-collapse: collapse;
margin-left: 50px;
padding: 4px;
width: 98%;
}

I know that this style is getting picked up because the table borders are orange in the printed output :-) However, the width is ignored regardless of what I specify it to be! (I've also tried max-width, but that makes no difference either!)

Issue 2
Also, if I have a plain <td></td> cell, the text wraps nicely within the (limited - see issue 1 above!) width that the table gives it. However, if I need additional paragraphs (<td><p></p><p></p></td>) then the text in the <p> tags ignores the cell/table width, and runs off the right-hand margin of the page.

I'm sure there are simple fixes for these, but I can't see them!

Many thanks for any suggestions you have!
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: @media print tables issues

Post by ChoccieMuffin »

You might need to add a complex selector in your print medium for "td p" so that a p inside a td behaves the same as a td.
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
WriterAndrew
Propeller Head
Posts: 50
Joined: Tue Mar 05, 2019 2:43 am

Re: @media print tables issues

Post by WriterAndrew »

Many thanks, ChoccieMuffin, that has certainly helped! (The <p> tags are now restrained within the column!)

Still can't get the table widths to play nice, but it is a big improvement!
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: @media print tables issues

Post by ChoccieMuffin »

What is actually happening with your tables?
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
Folkie
Propeller Head
Posts: 29
Joined: Sun Oct 27, 2013 8:55 am

Re: @media print tables issues

Post by Folkie »

We've had problems getting table column widths to stick. Our Flare trainer and consultant (Matthew Ellison) couldn't work out what was going on, he checked our table stylesheets very carefully and couldn't see anything wrong but eventually he hit upon a slightly peculiar solution that seems to work reliably. He was going to report it to Madcap but I don't know whether he did, certainly the issue hasn't gone away.

This might work for your issue as well, it certainly wouldn't hurt to try.
  1. Apply the table style. At this point the column widths don't obey the stylesheet settings.
  2. Open the table properties dialog.
  3. Increase the number of header or footer rows by one (whether or not you already have one) and click OK. Now (in our experience) the column widths magically adjust to the stylesheet values and remain obedient.
  4. Delete the extra header or footer row in the XML editor.
It's a few extra clicks for each table which is annoying as we have a lot, but at least it works!

Jane
Post Reply