Customize 2nd Row in a New Table Style

Explorer ,
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

49

Likes

translate

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
Adobe Community Professional ,
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. 

Likes

translate

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
Explorer ,
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.

Likes

translate

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
Adobe Community Professional ,
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.

 

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

translate

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
Explorer ,
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. 

Likes

translate

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
Adobe Community Professional ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

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.

Likes

translate

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