Px vs % #1

kpzani opened this Issue Apr 20, 2013 · 3 comments


None yet

3 participants


any chance of an option to specify the width in percentages rather than pixels?
might be useful. I use a bootstrap enabled theme which already has the css for the carousel so being able to disable that and the javascript would also be helpful. i've had to directly edit your code at the moment to block the pieces i dont need, which is not a good solution.

but thanks for the plugin saved me a lot of time.



I'll have to look into the width issue, but as to the styles and scripts, there are some built-in solutions:

You can dequeue the BS styles and scripts using the wp_bootstrap_carousel_enqueue action hook:

add_action( 'wp_bootstrap_carousel_enqueue', 'my_wp_bootstrap_carousel_dequeue' );
function my_wp_bootstrap_carousel_dequeue()
    wp_dequeue_style( 'wp-bootstrap-carousel' );
    wp_dequeue_script( 'wp-bootstrap-carousel' );

To remove the "extra" styles, use the wp_bootstrap_carousel_extra_style filter:

add_filter( 'wp_bootstrap_carousel_extra_style', 'remove_wp_bootstrap_carousel_extra_style', 25, 1 );
function remove_wp_bootstrap_carousel_extra_style( $style )
    $style = '';
    return $style;

Let me know how it works out!


i use this to fix
on carousel.less

.carousel {
margin: 0 auto;
width:100% !important;
position: relative;


As of version 0.3.0 the carousel is fully responsive

@diggy diggy closed this Oct 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment