Troubleshooting Problem with Rotating Images in 3D Carousel

While browsing through different carousel designs online, I stumbled upon one with amazing transitions that caught my eye. I thought it would be a great addition to a project I am currently working on:

If you want to check out the code, here's the link: https://codepen.io/joshrodgers/pen/MWBPXBx

However, I noticed that the responsiveness of the design needed some adjustments, especially for smaller screens like phones. Splitting the content into left and right sections didn't seem to work well on such devices; it made the text almost unreadable. To address this, I decided to remove the right-side content altogether.

After implementing this change, everything looked as expected except for one issue...

On the previous version of the carousel, there was a vertical paging feature located on the right side. Clicking on the next or previous circles would rotate the slideshow accordingly. On larger screens (above 900px), the paging area remained on top of the rotating images, which resulted in a visually appealing transition effect. However, when viewed on smaller screens like an iPhone, the images seemed to rotate on top of the paging area before reappearing again.

I believe this problem can be easily resolved with a simple tweak. Is there a way to ensure that the paging area stays on top while the images rotate smoothly through both desktop and mobile screens?

This issue is also present in the original version of the carousel, so I'm not sure how to go about fixing it.

Despite setting the paging area's z-index to 1, the images still appear on top. I even attempted assigning a higher value like z-index: 1000, but that did not yield any results.

If anyone has any suggestions or solutions to this problem, I would greatly appreciate it.

Thank you,
Josh

Answer №1

Upon further investigation, I managed to discover a solution!

The carousel__control div was responsible for the vertical pagination within the carousel container. While it was positioned correctly inside the container, this setup led to the issues I had described earlier, although the reason behind it is still unclear to me.

To resolve this issue, all I did was relocate the carousel__control div outside of the carousel container - essentially placing it right above in the document structure. Afterwards, I adjusted the margins and position accordingly. It required tweaking the values for margin: auto and top: 0, but once those adjustments were made, everything began functioning as intended.

You can view the updated pen here: https://codepen.io/joshrodgers/pen/MWBPXBx

Thank you,
Josh

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

Issue: There is no specified method of transportation established

I'm facing an issue while trying to create an Outlook calendar event from my application using Express.js. The error message I am receiving is [Error:No transport method defined], and eventually, the response returns as 200 success after approximately ...

Ways to conceal li and label elements without relying on a class or ID or utilizing a commonly shared class or ID

Is there a way to hide the li and label elements from a page without specific IDs or classes? <li><a href="https://www.test.com/feature/%d8%ac%d9%85%d8%b9-%d8%a7%d9%84%d8%a7%d9%86%d9%85%d8%a7%d8%b7/"><i class="fa fa-check" ...

The AngularJS factory and controller code seem to be failing to generate any output

After running the code below, I noticed that nothing is being displayed in my console to indicate any errors. However, in listService, there is an alert within the results, but it shows as "undefined." My main goal is to have a repeat function that lists ...

Display items in TableView sections based on the order of the months

I have an array of objects with Date properties that I need to organize into sections in a UITableView based on their respective months. How can I achieve this? Here is my model: class Birthday: Object { @objc dynamic var name: String = "" ...

Send the user to a 404 error page in Vue.js without changing the URL

Currently in my Vue.js project, I am showing the 404 page when a route parameter is invalid by using this code: this.$router.replace({ path: '/404' }); Is there a way to achieve this without changing the URL? I want users to be able to copy the ...

Bootstrap 4 Carousel Properly Aligned on Small Screens

I am facing an issue with the carousel display. It appears perfectly centered on desktop and laptop screens but shifts to the right on mobile devices. I checked using Chrome developer tools and everything seems aligned correctly within the container. Here ...

Poll # Warning: The variable "poll" has not been defined. Please check the code in H:xampphtdocsuserpollvote_form.php on

This is an HTML form for displaying a poll question. I am encountering errors with the variables 'poll' and 'question', as I am new to PHP. Can someone please assist me in resolving this issue? <html> <head></head&g ...

How can we showcase an HTML file in Express by utilizing a POST request?

My objective is to successfully submit my form data and then dynamically navigate to an HTML file where the values are displayed. Here's the code snippet from my app.post function in Express: const results = fs.readFile("order.html", " ...

How come JavaScript variables are able to persist on JQuery Mobile multi-page templates on desktop browsers, but not on mobile browsers?

My website was created using the jQuery Mobile multi-page template. While testing it on Chrome desktop, I noticed that my JavaScript variables (comics and checkedItems) retain their values when navigating between pages. However, on mobile devices, these ar ...

Differences Between Bootstrap Source Code and Bootstrap CDN Link

I am in the process of updating the user interface for my website, utilizing Bootstrap 5.3. Initially, I utilized the CDN link provided in the official documentation. Recently, I acquired Bootstrap Studio as a tool to streamline the UI development process. ...

Using React to manage elements with duplicate refs

Can someone help me with this issue I'm facing? let list = storage.map((element, index, array) => { return ( <li key={index} className="list-element"> <div className="title-wrapper" onMouseEnter={this.handleMouseEnter}> ...

Is it possible to move the login button to the right side of the screen?

I'm attempting to move the Login menu all the way to the right on the navigation bar. Currently, all the menu items are aligned to the left and I need to align the Login menu to the right. However, I'm unsure of where to begin. The navigation me ...

Is it possible to generate a PNG blob using binary data stored in a typed array?

I have a piece of binary data that is formatted as a PNG image. I am looking to convert it into a blob, generate a URL for the blob, and then showcase it as an image in various places where an image URL can be used, such as CSS. My initial approach invol ...

Service workers do not support fetching from .html files

Struggling with creating a functioning service worker for offline use has been a challenge. Despite trying numerous examples, the success has remained elusive. Initially, I suspected that the dynamic nature of my PHP-based website was causing the issue, or ...

Tips for postponing the first button event in Vue 3 and JavaScript

My current task involves setting up a button event in Vue 3 that triggers a setTimeout countdown on the button before redirecting to another page. The event function has a conditional statement that initiates a countdown from 5 to 0 as long as the countVal ...

When using VueJs, the input value may not clear upon pressing the ESC key for the first time

When I press the ESC key, my input should clear. However, I am experiencing a bug where the input is not cleared after the first press of the ESC key; it only clears after the second press. Even though the console displays an empty value for the input aft ...

Determine the React component's position in relation to the viewport while scrolling, ideally in percentage

I'm searching for effective solutions to solve this issue that has me stumped, and haven't come across any suitable libraries. What I'm looking for specifically is a way to track a Component's vertical position (Y) when scrolling, but ...

What steps should I take to convert the content in a UIWebView into a saveable image file?

Is it possible to save the entire content of a UIWebView as an image, including the parts that are not visible on screen with the existing code snippet provided below? - (IBAction)saveImage:(id)sender { UIGraphicsBeginImageContext(webCanvas.frame.size ...

How do I assign a specific application to open email attachments?

Greetings! I am interested in creating an iOS app that can open a specific format of attachment received via email. My goal is to be able to open the attachment from the email and have the option to view it using my app by long-pressing on the attachment. ...

Personalizing the alert for the UILocalNotification

Is there a way to modify the appearance of the alertView for a UILocalNotification? ...