Captions in Bootstrap 4 carousel vanish when adjusting size

My Bootstrap 4 carousel is displaying GIFs with captions for different project features. The captions work well on medium/large screens, but disappear entirely on smaller screens. How can I ensure the captions remain visible on smaller screens?





<div class = "carousel-inner">
<div class = "carousel-item active">
  <img class = "d-block carousel-image" src = "assets/translate-trimmed.gif" alt = "GIF of Sketchy translating objects.">
  <div class = "carousel-caption d-none d-md-block">
     <h5 class = "feature-name">Translate</h5>
     <p class = "feature-detail">
        Using the "Select Shape" option, user can move shapes around the canvas. Translation is controlled by dragging the mouse across the screen.
     </p>
  </div>
</div>
<div class = "carousel-item">
  <img class = "d-block carousel-image" src = "assets/raise-lower-trimmed.gif" alt = "GIF of Sketchy raising/lowering layers.">
  <div class = "carousel-caption d-none d-md-block">
     <h5 class = "feature-name">
        Raise/Lower
     </h5>
     <p class = "feature-detail">
        The "Raise" and "Lower" buttons can move shapes up or down in the list of layers. Layers are preserved even after saving/loading.
     </p>
  </div>
</div>

In my CSS, I have included the following relevant code:

.carousel-item .carousel-caption {
 position: static;
 padding-top: 20px;
 padding-bottom: 20px;
 text-align: center;
   margin-bottom: 10px;
}

Any suggestions on how to fix this issue? I can provide more code if needed, but the project is quite lengthy so I believe this snippet covers the problematic area.

Answer №1

Figured out the solution to my question! I found that removing both d-md-block and d-none from the div elements with the class "carousel-caption" did the trick. You can read more about it here.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What could be the reason for my https source being restricted from accessing the navigator Geolocation service?

While trying to retrieve a user's location using the code below: var geoLocationProvider = new Microsoft.Maps.GeoLocationProvider(BingMap.map); geoLocationProvider.getCurrentPosition( { showAccuracyCircle: false, timeout: 6000, successCa ...

Troubleshooting: Issues with JQuery validation for cross-domain URLs

I'm fairly new to using JQuery and I have a specific requirement which involves validating a link from another domain. If the validation is successful, I need to redirect (open the page in a new window) to that link. Otherwise, I should display an ale ...

Add JSON data to a table using jQuery and AJAX

When I make an AJAX call to retrieve data, the success part of the code looks like this: $("table.table").append("<tr><td>ID: " + item.ID + "</td><td>Name: " + item.name +" Url:</td><td><a href='https://.......s ...

Sending images from an external source to a client using Node.js and Express

I'm struggling with a problem. Assuming I have an external image URL, like this one from IMDb.com, . How can I display this image for the client? Currently, I have this: res.write('<img src="/http://ia.media-imdb.com/images/M/MV5BMTMyMzA5ODI ...

Using the `implode()` function in PHP to concatenate values for a MySQL query

Recently, I ran into an issue while using the implode function in PHP. <?php $insertValues[] = "(default,'{$y}', '{$p}', '{$o}', '{$i}', '{$u}','AMM-40','test')"; $query_status = ...

What is the method for retrieving a specific item within an array object using its index number?

How can I access the object '2016-11-12' inside the $scope.list and display the Order and Balance values? List: $scope.list = { ItemCode:'item1', '2016-11-12':[{Order:'1',Balanace:'2'}], '2016- ...

Minimize the gap between icon and text on paper-icon-item in Polymer

Is there a way to decrease the spacing between the icon and text in paper-icon-item? I'm looking for a solution to this issue. https://i.sstatic.net/kZ9sy.png I attempted the following: paper-icon-item { --paper-item-icon: { padding-right: 0; ...

What is causing the error to appear in the Android web-view when using vue.js?

During the development of my web app using Vue.js, I encountered a strange issue where everything was functioning correctly in desktop browsers but not on mobile devices. To troubleshoot this problem, I decided to install an Android emulator and use remote ...

A guide on setting up an Alert notification following a Server Error Response using Dropzone.js

I am trying to create a functionality in dropzone.js that triggers a javascript alert when the server returns an error in json format. Below is the function/method I have implemented for file upload, which seems to be working correctly: public functi ...

Number input in JavaScript being disrupted by stray commas

On my webpage, there are elements that users can control. One of these is a text input field for numbers. When users enter digits like 9000, everything functions correctly. However, if they use comma notation such as 9,000, JavaScript doesn't recogniz ...

Unable to modify the width of textarea

I've been struggling to adjust the width of a textarea element, as neither setting rows and cols in HTML nor using CSS has worked for me. The height adjustment was successful with HTML. Any tips on changing the width? form, label { position: rel ...

What are the steps to make a dropdown menu using only HTML and CSS?

Can someone please share the most straightforward method for creating a drop-down list using just HTML and CSS? ...

Ways to extract particular keys from a JSON array?

I am receiving an array of JSON objects in my response. {"took":0,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{" ...

Having trouble with getting v-cloak to function properly when dealing with asynchronous requests

I wanted to explore using the v-cloak directive to showcase a loading spinner while certain data properties in vue js are being loaded asynchronously for me to integrate into a table component. After successfully applying and styling my v-cloak styles on ...

Mistakes in validating email form

I'm having some difficulties creating a basic contact form. I'm following the guidelines outlined in and the initial step involves using JavaScript to highlight the input box with a red border when invalid input is entered. Unfortunately, the ...

Unable to make API call within ReactJs Component due to technical issues

I am brand new to react and I am coming across a few things that I don't quite understand (even after researching). So, I have decided to ask my questions here. Beforehand, I just want to apologize for my poor English and any potentially silly questio ...

Handle empty response from endpoint response

I'm facing an issue with a method that subscribes to an endpoint for a response. In some cases, the endpoint returns null and I need to handle this scenario. public list: Array<any>; this.GetList(this.getListRequest) .subscribe( (resp) =& ...

NodeJs is facing a challenge with the global variable for retrieving all routes methods after successful sign in

I have created a blog page with options for signing up and signing in. I used the req.locals.<name> method Using the GET method. Code snippet from server.js app.get('*',(req,res, next) => { res.locals.user = req.user || null; ...

Is there a way for me to retrieve the value nested within an object within another object from this Api response?

Hey there, I'm currently struggling to retrieve the value of faceit_elo from within the csgo object. I attempted using data.games.csgo.faceit_elo but unfortunately it didn't yield any results. Any suggestions on how to access this value would be ...

Tips for creating a hover effect on a rounded outline button with a gradient border

What I am looking for: I want the buttons to have rounded corners; The buttons should use linear-gradient, with button A as the border and button B as the background color; When hovering over the buttons, the opacity should change to 0.5. This works fine ...