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.

Tip: Make header row repeat when webhelp is printed

Postby doc_guy on Mon Oct 13, 2008 4:36 pm

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!
User avatar
doc_guy
Propellus Maximus
 
Posts: 1956
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West

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

Postby Dave Lee on Tue Oct 14, 2008 1:16 am

Nice tip, I've just added it to my stylesheets.
Dave Lee
Master Propellus Maximus
 
Posts: 5822
Joined: Mon Mar 05, 2007 8:33 am
Location: UK


Return to Tips and Tricks

Who is online

Users browsing this forum: No registered users and 2 guests