Positioning the slider based on the width

I've created a slider on my website:

However, I noticed that when I slide to the right, there is some space between the image and the edge of the container. Despite setting everything's width to 1100px, I can't figure out where this extra space is coming from.

Any insights on how to resolve this issue would be greatly appreciated! Thank you!

Answer №1

The slider cannot accommodate your image because it is not wide enough

     .slider {
position: relative;
display: block;
width: 1090px;   //this line
height: 300px;
margin: 60px auto;
overflow: hidden;

}

To fix the issue, adjust the container size by either reducing it by 10 pixels or 20 pixels instead of increasing the image size, as this may cause overflow into the next slide

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

Is it possible to convert a .gif file into a jpeg image format for mobile display on my Gatsby website?

I'm looking to convert a .gif file into a mobile.png image for my Gatsby site, but I'm struggling to find the right resources. Does anyone have suggestions on how I can achieve this? Here is the frame: https://i.sstatic.net/IjYv4.png ...

What is the reason behind the malfunctioning of this navigation menu?

This is a responsive navigation bar created using bootstrap. The issue I am facing is that I want the navigation items to be displayed in a single row. Here is the fixed-top navbar: Below is the navigation menu code: https://i.sstatic.net/Zqrvm.png ...

Steps to reveal a child element when the parent is set to overflow:hidden

There seems to be an issue with a child element having overflow:visible; while the parent element has overflow:hidden;. The height of the child element exceeds that of the parent element. Why is the child element hidden even when its overflow property is ...

access the ckeditor within the frame

I have a CKEditor in a frame and am experiencing an issue. When I try to console log from the browser, it won't work until I inspect near the frame and perform the console log again. [This is the CKEditor] https://i.stack.imgur.com/fWGzj.png The q ...

What is the method to assign a placeholder value using CSS?

Is there a way to assign a placeholder value to an input box using CSS only, without relying on JavaScript or jQuery? If so, how could this be achieved? ...

Basic jQuery request for JSON data

In an effort to send user data to a PHP script and display the results in an element, I am utilizing JSON. The process works smoothly until reaching the response stage. Despite receiving the correct results when logging to the console, attempting to append ...

Compatibility of HTML5 websites with Internet Explorer

Following a tutorial on HTML5/CSS3, I meticulously followed each step to create a basic website. While the demo of the site worked perfectly in Internet Explorer 8 during the tutorial, my own version did not display correctly when viewed in IE8. I discove ...

Divide the space evenly with minimal gaps

I've been trying to use examples from the web, but I just can't seem to get it right. Who better to ask than you guys? I want to evenly distribute id="klip". I have set their widths to 18% so that each space is 2%. Here's how it looks now: ...

Tips for ensuring that an absolutely positioned element fills the entire width of the screen while being contained within a fixed-width container

Here is the HTML code snippet: <div id='id1'> <div id='id2'> </div> </div> And now the CSS code snippet: #id1 { width: 300px; height: 200px; margin: 0 auto; background: red; position: relative; ...

Angular Partial Submit/Procession

I have more experience with JSF than Angular or jQuery. I am interested in learning about partial submit and processing in web development. Is there an easy way to achieve this? Specifically, I would like to understand how to implement partial page process ...

CSS Grid expands the item width on its own when there is still space left

Having some queries regarding the piece of code provided. Currently, I have a collection of 5 cards displayed in rows of 3 cards each using the styling grid-template-columns: repeat(3, minmax(200px, 1fr));. My concern is whether there is a way for the 4th ...

Create a Datatable by implementing conditional statements

I am trying to render a datatable, with the content slightly changing based on the value of a variable. My ideal approach would be to reuse part of the code like this: var DT1 = $('#myTable').DataTable( { ajax: { url: 'ajax_sear ...

What might be causing the jQuery UI Spinner arrow buttons to not appear?

Once I implemented a very basic version of the jQuery UI Spinner Widget, I encountered an issue where the up and down arrow buttons were not displaying. Clicking on the area where the buttons should be triggered the Spinner events and the number incremente ...

What could be the reason for an element with a width of 100% not recognizing the width of its parent?

One issue I'm currently experiencing is my inability to match the width of the parent within a flexbox item. Below is the code snippet, where the span element does not have the same width as its parent. .container { display: flex; } .item1 { ...

Using Ajax and JQuery to show a success message prominently

Currently, I have a fully functional flash system implemented in PHP to display a success message to the user once an entry is created in the database. In one of the forms on my website, there is a select field where users should be able to seamlessly add ...

Changing the appearance of an element on the Navbar when it is being

Dealing with a specific style of search called macstyle can be quite convenient, but it becomes frustrating when combined with a dropdown menu. The issue arises when the search is in focus and then the dropdown menu is clicked, causing the transition to sh ...

Comparison of utilizing PHP within CSS versus Implementation through JavaScript [General]

Curious about the incorporation of PHP in CSS, especially in relation to my current Wordpress Theme project. I am aiming for high levels of customization and have been using a JS file to change CSS Properties through PHP. However, I'm not entirely con ...

Advancing with Bootstrap 4: Progress Bar Evolution

It appears that Bootstrap 4 has introduced a new method for updating the progress of your progress bar. Aim: Dynamically update the progress bar percentage upon click <div class="progress"> <div id='progressBar' class="progress-bar" r ...

Guide for creating a scroll-triggered rotation animation using only JavaScript

Looking to achieve a cool scroll effect with an image that rotates on the X-axis by a specific degree, such as 70deg. The goal is to have the image's rotateX value change to 0deg when it enters the viewport upon scrolling and revert back to 70deg whe ...

Tips for enabling multiple v-list-group components to remain open simultaneously (bypassing the default Vue behavior)

Currently, I am facing an issue with Vue's default behavior where only one v-list-group can be open at a time. I am using Vuetify 2.6 and have attempted to use the multiple prop without success. Additionally, individually assigning the :value prop to ...