• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Customize 2nd Row in a New Table Style

Participant ,
Oct 28, 2020 Oct 28, 2020

Copy link to clipboard

Copied

I created a new table and need to make the first and second row with the same shading color. I think RH 2019 only allows be to do this on first, even, odd, and last row, but not second row. How do I do this? Thank you for your help.

need2ndrowshaded.png

Views

108

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 28, 2020 Oct 28, 2020

Copy link to clipboard

Copied

I can't see any way in editor to do it, but you can do it in the code view.

 

First, remove the background-color setting for First Row using the editor. Then switch to the code view and add the following:

 

table.Mytablestylename tr:nth-child(1),
table.Mytablestylename tr:nth-child(2) {
background-color: pink;
}

 

Change 'Mytablestylename' to match your table style. and 'pink' to whatever colour you need for the top two rows.

 

Note: In RH2019 New UI Update 12 style editor, you won't be able to see that the above styling exists. I'm not sure if that is different in Update 13 or 14, or in RH2020. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

Amebr, thank you as always. I'll give that code a shot later next week. BTW, I have RH2019 latest update 14. A side question... is RH2020 free upgrade from RH2019? I couldn't find where it says so.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

Is it important the second row is part of the style?

 

If not, simply select the second row of the table in author view and in Properties > General > Background you can apply a colour in that specific table.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

Thank you Peter for what you do for the community. Unfortunately, most of our tables are like that and it'll be easier if I can make the 2nd row a new style. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

LATEST

I think it you're on a subscription plan then upgrading to RH2020 is included. Otherwise you'll need to purchase a subscription to get the new version.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp