After implementing the custom.css code provided below, I have successfully overridden the CSS files of a commercial Joomla 3 Template.
div[itemprop="articleBody"] h1, h2, h3, h4, h5, h6 {
margin-top: 18px!important;
margin-bottom: 0px!important;
}
The custom.css should specifically target:
<div itemprop="articleBody">
<h1><strong>Some Text</strong></h1>
<p> Some Text Some Text Some Text Some Text </p>
</div>
An issue arises where the custom.css code affects h tags located outside the
<div itemprop="articleBody">
container in all major browsers.
What could be causing this problem?