Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
142
rated 0 times [  143] [ 1]  / answers: 1 / hits: 5085  / 11 Years ago, mon, january 20, 2014, 12:00:00

i'm developing a website with bx slider.



i need three sliders on a page for slide html content.



i have added a bx slider on page and customized it with css. i made changes in jquery.bxslider.css



now i'm adding another bx slider on a page. but it applies the css i modified on that new slider too. so i want to change CSS of the new added slider but not which one i modified. so as i think it needs two css files.



i tried css with nth-child but not working, it applies on both sliders.



so, how can i change css files in bx-slider ?


More From » jquery

 Answers
11

You should just have to add class to each different bx-slider. You do not need 2 separate CSS files.



HTML



<ul class=bxslider one></ul>
<ul class=bxslider two></ul>


CSS



.bxslider.one {
background: blue;
}
.bxslider.two{
background: red;
}


If this is not working you can create a container for your bx-sliders and target the bx-wrapper class within:



HTML



<div class=slider-one>
<ul class=bxslider></ul>
</div>
<div class=slider-two>
<ul class=bxslider></ul>
</div>


CSS



.slider-one .bx-wrapper .bx-viewport{
background: blue;
}
.slider-two .bx-wrapper .bx-viewport{
background: red;
}

[#48528] Sunday, January 19, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
shylaelisan

Total Points: 37
Total Questions: 94
Total Answers: 110

Location: Angola
Member since Tue, May 5, 2020
4 Years ago
;