My company has recently migrated from RoboHelp 2017 to RoboHelp 2019. In our .chm files, we have used tables with alternating row shading (white/transparent and light gray). We've added more rows in the middle of a table and I now need to redo that shading. I have been able to add shading to rows but can't seem to remove the pre-existing shading. Has anyone else encountered this?
I think it's to do with where the shading is applied in RH2019 New and how the cascade part of cascading stylesheets (CSS) plays in to things.
In Classic the shading is applied to the td tags. In New, depending on how you apply the shading, it may be applied to the tr tag. The cascade means that more specific rules take precedence over less specific. If you've applied the shading to the tr, as the td is more specific than tr, the td formatting will take precedence.
The quickest way to get around the issue would be to make sure you select the cells and not the row (which can be a little tricky in New) before you apply the shading. If you check the little bar underneath the topic tab when you select a row, you should be able to see if you've selected the cells (a td will display at the end of the list of tags) or the row (the list will end with tr).
To get rid of some styling, you might need to manually edit the code. Classic uses the deprecated bgcolor="#ffffff" coding, while New uses the modern style="background-color: #ffffff" coding. The bgcolor code isn't affected by the new formatting controls or by Clear Formatting. So setting the shading to transparent just removes any "style" code and leaves bgcolor in place.
For example, to remove shading from the following table row, you'd delete bgcolor="#C0C0C0". There may be more inline code depending on what you've applied, but just that bit is the shading.
Once you've removed that, it won't matter where you apply the row shading (either to the tr or to the td); both will work. (Unless you're using table styles, where the cascade comes in to effect again - let me know if this is the case and I'll run through that scenario.)
On a side note, I'd suggest looking at table styles as they should save you a lot of time - they'll apply the row shading automatically as you add and remove rows. Just have a test as I'm unsure whether chm will cope with some of the CSS used. I would hope that the compile automatically translates it to something chm understands. 🙂