Enjoy the sleek Bootstrap 4.1.0 carousel featuring Font Awesome controls, but keep in mind that the controls will vanish when

I created a Bootstrap 4.1.0 carousel with Font Awesome controls positioned outside the images using CSS. However, when hovering over the control arrows, they disappear. Here is a link to the codepen I created: https://codepen.io/mlegg10/pen/qYEegR Could someone advise me on how to fix this issue so that the carousel controls don't vanish when hovered over? Thank you.

<script> $('.carousel').carousel()</script>
.carousel {
  background:#F5F5F5;
}

.carousel-item .img-fluid {
  width:80%;
  height: 80%;
}

.carousel-item a {
  display: block;
  width:90%;
  height: 90%;
}

.carousel-control-prev {
  color:#036;
  margin-left: -1rem;
  z-index: 10;
}

.carousel-control-next {
  color:#036;
  margin-right: -1rem;
  z-index: 10;
}

.carousel-controls a:hover {
  color: 004289;
  z-index: 10;
}
<div id="carouselExampleControls" class="carousel slide align-items-center" data-ride="carousel"> 
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<img class="d-block mx-auto img-fluid" src="http://nationalkitchencabinets.com/slides/A1.jpg" alt="A1">
 </div>
<div class="carousel-item">
<img class="d-block mx-auto img-fluid" src="http://nationalkitchencabinets.com/slides/A2.jpg" alt="A2">
</div>
<div class="carousel-item">
<img class="d-block mx-auto img-fluid" src="http://nationalkitchencabinets.com/slides/A3.jpg" alt="A3">
</div>
<div class="carousel-item">
<img class="d-block mx-auto img-fluid" src="http://nationalkitchencabinets.com/slides/A4.jpg" alt="A4">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<i class="fas fa-chevron-circle-left fa-lg"></i>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next text-faded" href="#carouselExampleControls" role="button" data-slide="next">
<i class="fas fa-chevron-circle-right fa-lg"></i>
<span class="sr-only">Next</span>
</a>
</div> 

Answer №1

To improve the visibility of your carousel controls, you should implement the :hover action and change the color. Currently, the controls are displaying but due to the white background, they are not easily visible.

.carousel-control-prev:hover {
  color: red;
}

.carousel-control-next:hover {
  color: red;
}

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

Exploring the Power of Laravel 5 with AJAX

When selecting a client name, I would like to use ajax to display a partial form. Currently, I am able to retrieve data from the database with this script: <script> $('#client').change(function(){ var client = $(this).val(); var ...

Sorting through various cards by their value can be easily achieved by utilizing the onChange event when choosing an option from a dropdown

Here is my approach to filtering and displaying a string of objects from an array called displayImages based on the selected value in a dropdown menu. const locationNameDropdown = () => { return displayImages.map((data, key) => ( <opti ...

Issue with AJAX functionality in CodeIgniter causing errors

I am facing an issue with Ajax in CodeIgniter. The alert message within the script works perfectly fine, but for some reason, the controller function is not being called. View section: <div class="col-md-6 col-sm-6 col-xs-12"> <a class="butt ...

SliderToggle and Div implementation in Internet Explorer (IE) using jQuery

I'm encountering an issue with jQuery's slideToggle function and a div specifically in IE. Here is the code snippet causing the problem: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.d ...

Deciphering a Base64 image string in order to convert it back into a file for uploading to Parse

Incorporating CropperJS into a Node.js solution poses a challenge for me as I aim to convert the returned Base64 string into a file format in order to upload it. The goal is to maintain functionality while utilizing the file type as a parameter. Despite m ...

Is there a way to properly direct to an internal page while utilizing [routerLink] and setting target="_blank" without triggering a full page reload?

I'm attempting to use [routerLink] along with target="_blank" to direct to an internal page without triggering a full app reload. Currently, the page opens in a new tab, but the whole application is refreshed. Here is the HTML: <a [routerLink]=" ...

Unable to use the toDateString() method on a JavaScript Date object

I've encountered an issue that I need help understanding. My goal is to convert a date into a more user-friendly format using the toDateString() method. However, I keep receiving an error message stating "toDateString() is not a function." Currently, ...

What is the mechanism Angular utilizes to determine the exact location of directives within a webpage?

Can you explain how Angular is able to locate the directives on a webpage and establish connections with or observe those elements? I've searched through the DOM reference, but it seems like methods like getElementbySomething and querySelectorAll may ...

BrowserSync Failing to Load

Recently started using BrowserSync and I'm trying to figure out how to make it work smoothly. My main file that contains all the code is named 'gulpwork'. Inside 'gulpwork', there are 4 folders - two for converting Pug from &apos ...

Stopping all other audio players when a new one is played in Angular

I am in the process of creating a website using Angular to showcase my music, and I am looking for a script that will pause other audio players when a new one is played. Does anyone have a solution for this? HTML <div> <img src="{{ image }}" a ...

Tips for disabling the window.onbeforeunload function when handling an ajax response with JavaScript

One way I am utilizing java-script is through the window.onbeforeunload function, which displays an alert to the user if they attempt to leave a page without submitting certain data. This feature seems to be running smoothly. However, I have encountered a ...

Generating personalized MongoDB collections for individual users - A step-by-step guide

My query is more about the procedure rather than a specific coding issue. I am working on a node application and using DHTMLX calendar. What I aim for is to have each user with their own set of events on their individual calendar. Currently, the implement ...

What are the steps to modify the camera type in Three.js?

I have added a dropdown list on the page for selecting between two cameras - Perspective and Orthographic. Currently, my Three Scene is using a perspective Camera. I would like to dynamically change the camera to "Orthographic" when selected in the dropdow ...

Can you please save the <a href="cb289e02-ed2b-4daa-">pdf</a> with a more detailed file name?

Recently, I came across a situation where I needed to link a document accessible through a URL like http://www.myCompany.com/Documents/cb289e02-ed2b-4daa-8. In order to send this document via email to users, I used the code snippet <a href="http://www.m ...

Export an asynchronous promise result in Express.js from my module - how to do it?

My express.js application consists of two modules: The first module is an initializer, which I call at the beginning of the main module: MainModule.js const result = require('initilalizerModule') ... InitilalizerModule.js: const soap = requi ...

The primary section does not occupy any vertical area

I am currently working on a new design that includes a header, side menu, and footer within the main section. My goal is to have the main section fill the remaining space with a minimum height, pushing the footer to the bottom of the page. I want the mai ...

Refresh a Div using a Partial View

Need help updating the content of a Div using a Partial-View? Not sure how to modify the .html() function properly. This is my Controller method: public IActionResult UpdateDiv() { return View("_PartialView1"); } Here's the JavaScript function ...

Tips for retrieving the value of a dynamic and multi-update id using jQuery and Ajax

I'm in need of assistance with a few different tasks: Firstly, I am looking to understand how to retrieve the id of an input element when it is dynamically generated from a database. In the HTML, it displays something like field 1 -> id = "pa ...

What sets my project apart from the rest that makes TypeScript definition files unnecessary?

Utilizing .js libraries in my .ts project works seamlessly, with no issues arising. I have not utilized any *.d.ts files in my project at all. Could someone please explain how this functionality is achievable? ...

Dynamic reloading of a div with form data using jQuery's AJAX functionality

I am currently developing an online visitor chat software using PHP and MySQL. My goal is to load the page when the submit button is clicked. Submit Button ID: send Visitor ID: vid Chat ID: cid Below is the snippet of code for an Ajax request that I hav ...