The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Need a trick to make DIV settings take precedence Re: Need a trick to make DIV settings take precedence


We are creating online help and PDF user manuals from a single (xml) source using predefined styles. E.g. for notes we use p.N_Note. Ordinarily there are no DIV tags…we add them to specific parts of the source so that reviewers can see what they need to review; in the CSS we set the background colour to yellow. Then before creating the final output we remove the style definition from the CSS (or set it to no colour) so that the highlighting is removed from the output. Easy and low risk.

This works fine except for a few styles that have background colours applied to them — the styles override the container div background colour. We would like a way to override this.

Since posting this question I have learned that one way to do what we want is by adding a definition such as the following to the CSS:

#ID1 p.N_Note

…and applying ID="ID1" to the particular div tags concerned

Unless there is a way to do this without editing the html code we will go with this.