Bootstrap 5 Carousel Caption Outside of Image

By default Bootstrap 5, put the caption on the image and no way you can change the caption position by modifying only the Bootstrap CSS.

You need to change the CSS and add jQuery to do this.

After few tries, I manage to do put the carousel caption outside of images for large screen. For small screen the caption is still on the image.

For small screen, to make the caption outside of image, you can change the CSS by using CSS media screen.

bootstrap 5 carousel caption outside image
bootstrap 5 carousel caption outside image

Demo – Bootstrap 5 Carousel Caption Outside Image

How To Change Bootstrap 5 Carousel Caption Position

CSS Not to Display Default Caption Position

Add CSS to Display New Carousel Caption Position

You can change the CSS to where you want to put your text.

Add jQuery Script to Retrieve Current Caption

Add id to each carousel-caption

Full Source Code

Bootstrap version 5 Text On Image When Hover or Static Text

I couldn’t find an easy tutorial how to do text on image for Bootstrap version 5 when you mouse hover an image or a static text on the image.
So I have to try few solutions before get it right.

The solution is using purely CSS without any Javascript

The CSS

How To Use It

  1. Wrap the image in a div with class=”text-on-image”
  2. Under the div wrapper,include a text div with class=”text”
  3. You can add link or button

Demo on JSFiddle