Your question is unclear. There are no elements in the html markup you posted that match any of the css rules.
The html + css you posted renders like this:
It displays as expected and does not match your description of the problem at all.
Perhaps you could share a link to the page in question, or recreate the problem on codepen?