I think that you are going to struggle to achieve what you are after.
I guess your heading elements are produced by PHP so you would find it difficult to add specific classes to the elements.
If you were coding the elements individually, you would just add:
<h2 class="black">Heading<h2>
and then:
h2.black {
color: black;
}
Your code just generates straight heading elements. You could try :nth-child but then you would struggle with that if your choice of color is random or has no obvious pattern – I think.
martcol, thanks for info. I tried that code with !important before but changes on whole site not just that page or that class on the menu. I maybe have to just choose a colour for the whole site, go back to keeping it simple. ta
Try reading a little on “CSS specificity”
ok so i watched a bunch of vids on specificity. points system etc.
but how do i apply that to say the contact form of my site. I want all text on that page to be black. Do i edit the plugin class form? Is there a bit of code i can put in the style.css for the plugin to ignore inheritence settings from bootstrap.css of main theme?
Look further up the code, there might be a class on the article or body that identifies that specific page or template. You could use that to target headings on just that page.
For example, on this page:
http://qubrfc.byethost11.com/contact_trashed/
The body has this class:
page-id-33
You could do something like .page-id-33 .page_heading_content h1 to change the colour of the heading on just that page.
thanks ill give that a go