I am trying to override the padding set in 'class=image' (set in a parent div) however target this override using a class set in the 7th child of that parent div using CSS only. Can I do this by changing the parent class for it to target only that 7th nested Childs class?
<div class="image hero header">
<div class="umb">
<div class="grid">
<div class="container">
<div class="clearfix">
<div class="col-sm-12">
<div class="hero-2020">
<div class="override 2020-image post">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Here's the CSS for all 6 previous classes:
<style>
.image{
width: 100%;
height: 100%;
padding: 1.5em 0 6em 0;
background-size: cover;
background-repeat: no-repeat;
position: relative;
background-position-x: 50%;}
.override{
padding: 0px !important;}
.image.umb{
margin: auto;
top: 1em;
height: 50%;
width: 1005;}
div .grid{
display: block;}
.container{
max-width: 100%;
padding-left: 0;
padding-right: 0;
margin: 0 auto;}
.clearfix{
margin: 0px;
zoom: 1;}
.col-sm-12{
width: 100%;}
.hero-2020{
padding-left: 0px !important;
padding-right: 0px !important;}
</style>
I have tried to use the CSS nth child concept without much luck. So I'm hoping I can use something a little more specific when writing out the element in CSS, for example > override.image{styles} ? Thanks.