Tip: Make header row repeat when webhelp is printed

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.
Post Reply
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Tip: Make header row repeat when webhelp is printed

Post by doc_guy »

If you're wondering how to make a header row of a table repeat when users print your WebHelp output, then you've come to the right place.

When you create a printed target (PDF target, Framemaker target, or Word target), this happens automatically. However, when you create an online target like WebHelp, you will find that if you have a table that breaks across a page, the table header row isn't printed at the top of the new page.

You can change that with an easy line of code that you add to your project's CSS file. Here is what you do:
  1. Open your project in Flare, and find your CSS style in the Content Explorer's Resources folder.
  2. Right click on the CSS style sheet, and select "Open With -> Internal Text Editor"
  3. Scroll to the end of the code.
  4. Copy and paste the following code from this page into the text editor after all the existing code:

    Code: Select all

    thead {
               display: table-header-group;
      }
    
  5. Save the style sheet and close the internal text editor (close the tab).
That's it! Now when users print your WebHelp, if a table breaks across pages, it should have the header row repeated at the top of the new page.

A word of warning, however: this behavior is governed by the user agent (the web browser, in this case) . Not all browsers support this functionality, so this is browser-dependent. (I've looked at Firefox and recent versions of IE, and they seem to work fine.)

Also, the specification does not define what happens if you assign table-header-group to multiple elements, so just add it to the <thead> element, and you should be fine.

Good luck!
Paul Pehrson
My Blog

Image
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Tip: Make header row repeat when webhelp is printed

Post by NorthEast »

Nice tip, I've just added it to my stylesheets.
Post Reply