4

I am using jquery bx slider. I want to remove the border around the slides. How do I do this? I tried this, but it didn't work:

ul.bxslider {
  -webkit-box-shadow: 0;
  -moz-box-shadow: 0;
  box-shadow: 0;
  border: none;
}

Any other ways to do so?

Legionar
  • 7,472
  • 2
  • 41
  • 70
arximughal
  • 270
  • 3
  • 16

5 Answers5

3

As accepted answer is no more correct (in 2018 - bxSlider v4.2.12), I added here working CSS:

.bx-wrapper {
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  border: 0;
}

!important is not necessary, if you add this CSS after linking to bxSlider's CSS file.

Legionar
  • 7,472
  • 2
  • 41
  • 70
2

the "box-shadow" is not set to the ul but to the parent (".bx-wrapper .bx-viewport"), remove the "box-shadow". you also have 5px width of border but the color is white (#fff) so choose whatever you need it or not.

.bx-wrapper .bx-viewport
{
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}
Eran.E
  • 940
  • 5
  • 8
2
.bx-viewport {
    position: static!important; /* center to page correctly */
    border: 0!important; /* border */
    -webkit-box-shadow: none!important; /* these two shadows */
    box-shadow: none!important;
}
cizi
  • 31
  • 2
2

The only working solution for me was to change the wrapper class:

slider.bxSlider({
    wrapperClass: 'your-class-here'
});

From the documentation: wrapperClass is string with default value 'bx-wrapper'.

wrapperClass - Class to wrap the slider in. Change to prevent from using default bxSlider styles.

Crasher
  • 2,211
  • 2
  • 18
  • 17
1

If you look at styles of rendered bxSlider you will see the wrapper <div class="bx-wrapper" style="max-width: 1100px;"> and shadow is set by bx-wrapper class. So you can hide shadow it by override this class.

Previous solution didn't work for me. It worked when i add !important to styles:

.bx-wrapper {
  -moz-box-shadow: none !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}
valex
  • 5,163
  • 2
  • 33
  • 40