Skip to main content
Inspiring
June 4, 2021
Question

RH2020 (Update4): Table header

  • June 4, 2021
  • 7 replies
  • 397 views

Hi

I am using RH2020 (update 4) Frameless skin for my project.

I would like to know how can I set the first row of the table as table header. I have created a style for the table but I couldn't find an option to set the first row as the table header. Can this be done in the Table styles or do I need to specify it in the HTML code. 

This topic has been closed for replies.

7 replies

Peter Grainge
Community Expert
Community Expert
June 13, 2021

Applying TH to the first row simply renders the text to centre aligned bold (the HTML default) unless you have changed the definition in your CSS.

 

In Word you can set the first row of a table to repeat on page split but that is applied in the document. My site has macros that will run through Word documents and allow you to apply that to all tables or selected tables.

 

I think right now all you can do is generate to Word and run one of those macros.

 

I believe Adobe will be looking at THEAD and TH in future updates. I don't know if that will fix the issue in either PDF or Word. Word, for example, is looking for the tables to have the repeat setting applied rather than looking for any HTML tag.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

 

 

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Inspiring
June 13, 2021

Hi

What does the "Convert to Header" do? I applied it to the first row of my table and in the PDF output the table header did not repeat.

All I did is inserted a table from the top ribbon and applied the "Convert to Header" option to the first row. Did not apply any customised styles. Added multiple rows and then generated a PDF output. But unfortunately the header did not repeat. 

This is how I applied the style:

  • Inserted a table.
  • Highlighted the first row
  • Right-clicked the first row and then clicked Convert to Header.

Are there any other steps I need to follow while applying the "Convert to Header" style?

 

Peter Grainge
Community Expert
Community Expert
June 7, 2021

Rereading the information I was given, you should be able to apply <thead> in the code as well.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Peter Grainge
Community Expert
Community Expert
June 7, 2021

I understand that <thead> will be added in an update, also that <th> can be applied to the code but the table code is complex.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Community Expert
June 7, 2021

You can format the first row so it's looks like a header row using the style editor. It won't be a th or thead semantically, but you might not care about that.  To format the first row, open your table style in the editor, in the Apply Formatting to field select 'First Row' and define the formatting you want (e.g. shading, bold, etc).

 

Otherwise, yes, you'll need to convert the first row of cells to th for every table. And I couldn't find a way of inserting thead using the menus, so you'd need to go into code view and enter that manually.

Inspiring
June 5, 2021

Thank you KarenMinOR

Are you saying that for every table in the project I will need to either add the "th" tag or use the "Convert to Header" option? The project I am handling has got multiple tables. 

 

I was wondering if it is possible to create a Table style wherein I can specify the first row as the Header so that once I apply the style to a table it automatically considers the first row as the Header. 

 

In the style sheet, when we create a new style, it has two tags in it - "th" and "thead". Does this help in creating Tables with Header rows?

 

 

Inspiring
June 4, 2021

Here's the easiest way I've found to create tables with a header row in RH:

  1. Click the table creation icon on the top toolbar. Choose the number of rows and columns you need.
  2. When the table is created, click on it and then open the Table Properties pane on the right.
  3. Choose the table template that has the orange colored header row (hdrevenrows).
  4. I then altered the class definition for the "hdrevenrows" table in my CSS to use our corporate color palette, etc.

The HTML for the table needs to have a <thead></thead> section where the header row lives.

<table class="hdrevenrows">
    <thead>
      <tr>
        <td>Property</td>
        <td>Values</td>
        <td>Description</td>
      </tr>
    </thead>
    <tbody>
	  <tr>
        <td>Property</td>
        <td>Values</td>
        <td>Description</td>
      </tr>
	</tbody>
</table>

I hope this helps!

Inspiring
June 4, 2021

You might also find this context menu option handy for tables that already exist.