Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing arrows in Bootstrap Carousel

here is the homepage of my blog www.lowcoupling.com I'd like not show the left and right arrows in the bootstrap carousel I have tried

.glyphicon-chevron-right{
     display:none;
}

(and the same thing for the left arrow) but it does not seem to work.

like image 934
lowcoupling Avatar asked Sep 29 '13 06:09

lowcoupling


2 Answers

This will hide the buttons

.right.carousel-control, .left.carousel-control {
    display: none;
}

If you still want to be able to click where the button is drawn, do:

.right.carousel-control, .left.carousel-control {
    opacity: 0;
    filter:alpha(opacity=0); /* IE support */
}
like image 74
azz Avatar answered Nov 19 '22 23:11

azz


I took a quick gander, and you are almost there, but Bootstrap's css is taking precidence over your css. Bootstrap has:

.carousel-control .glyphicon-chevron-right{
    ...
    display:inline-block;
}

If you were to assign an arbitrary point value to this, Bootstrap is providing '2 points' to provide the style 'inline-block'.

Because your css is loaded after Bootstrap, simply putting an extra class (and matching Bootstrap's 2 points) before ".glyphicon-chevron-right" should do the trick.

.carousel .glyphicon-chevron-right{display:none;}

Or, if you want your override to be "stronger", putting an id in front gives your override a higher value (approx 256)

#myCarousel .glyphicon-chevron-right{display:none;}
like image 43
TheIronDeveloper Avatar answered Nov 19 '22 21:11

TheIronDeveloper