3

guys im trying to remove the gradient caused by the left carousel-control.

<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">

<span class="glyphicon glyphicon-chevron-left" aria-hidden="true">/span>

<span class="sr-only">Previous</span>

3 Answers 3

10

Just add this: style="background:red !important"

<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev" style="background:red !important">

to remove complete background: none;

6
  • I put red but you can choose your color ;)
    – HudsonPH
    Jun 27, 2016 at 7:52
  • Thanks alot! It worked. Is there a way for me to change the color of the chevron arrows? Because when i changed the background to white, the arrows are hard to see.
    – helpmepls
    Jun 27, 2016 at 7:57
  • create a style: .glyphicon {color:blue !important;} or insert a style style="color:blue !important"
    – HudsonPH
    Jun 27, 2016 at 7:59
  • Hi i tried using both of the styles to change the color of the chevron arrows but does not work. Is there another way?
    – helpmepls
    Jun 27, 2016 at 8:16
  • Hi, i've figured out the way to change the color of the arrow already. Thanks!
    – helpmepls
    Jun 27, 2016 at 8:18
1

When experimenting, I found removing the class left from <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev"> seemed to remove the gradient.

It should look like this once removed - <a class="carousel-control" href="#myCarousel" role="button" data-slide="prev">

The same can be done for the right carousel control too, just remove the right class.

1
  • 1
    This displays the one on top of the other. When I add class=col-md-offset-10 to the "next" slider element, they render more or less ok. Bit hackey though...
    – wecky
    Jul 29, 2018 at 15:20
0

When the class left is remove, the gradient color will be removed too. But when the class right is remove the alignment of the button will for the prev and next is affected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.