While working with BXSlider, I'm trying to alter the background of every second iteration of the slider. However, there is an external CSS sheet affecting all sliders on the page that I don't have control over.
Additional Information:
<div class="bx-wrapper">
<div class="bx-viewport">
<div class="bx-slider">
</div>
</div>
</div>
The classes Bx-wrapper and Bx-viewport are automatically generated by the bxslider library.
The inaccessible CSS file sets the background color to #fff-
.bx-wrapper .bx-viewport {
background: #fff;
}
To change the background of the slider, I use -
.bx-wrapper .bx-viewport:nth-child(even){
background-color: rgb(245,245,245);
}
The challenge I face is that the original #fff color takes precedence, and I can only observe the above CSS taking effect when I disable that style in dev tools. How would you suggest ensuring that the specified CSS overrides the existing styles?