When scrolling a semi-parallax effect in a resized window, I notice a calming presence of empty white

I recently acquired a WordPress website from its previous owner, and I'm encountering an issue with the parallax section at the top. It seems to be scrolling at a slightly slower pace than the rest of the page. I've tried adjusting the width and other settings, but it appears that the problem lies in the original image crop size. I'm struggling to figure out how to change the original crop.

When the page is displayed in full screen, the scrolling works perfectly fine. However, when I reduce the screen size, there's some white space visible while scrolling down. I believe resizing the original crop to be smaller will solve this issue and provide a better visual effect even when the page is resized. (I have also tested using a larger image, but encountered the same issue). You can find all the referenced images mentioned in this post on this link.

Check the last image for the white space observation.

Refer to the middle image for the desired scroll effect.

This is the HTML code snippet for the image:

<section id="hero-header" data-speed="8" data-type="background" style="background: url("http://playgrounddistribution.com/wp-content/uploads/2017/03/playground-logo-1.jpg"); ?>')  50% 0 no-repeat fixed;">

Look at the first image on the Imgur gallery linked above for the background script reference.

Hero Header

#hero-header {
    height: 100%; 
    width: 100%; 
    position: relative; 
    -webkit-background-size: cover !important;  
    -moz-background-size: cover !important; 
    -o-background-size: cover !important; 
    background-size: cover !important;
}

Here's a portion of the code related to resizing, hope this helps:

@media handheld, only screen and (max-width: 769px) {
    
    
    #hero-header {
        background-position: center center !important;
        background-attachment: scroll !important;
} 
}

Answer №1

The key lies in the dataspeed attribute and the specific lines in parallax.js, namely line #18 and line #37.

Answer №2

Since I didn't receive a response that was helpful, I decided to take matters into my own hands.

Due to time constraints, I opted for a quick fix by adjusting the parallax effect on the page when the window width is below 1800px to eliminate the excess white space issue.

Check out the code snippet below:

@media handheld, only screen and (max-width: 1799px) {
    #hero-header {
        background-position: center center !important;
        background-attachment: scroll !important;
    }
}

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

Calculating the size of grid thumbnails or items using the calc() function

I am currently working on building a responsive portfolio grid that spans the full width of the screen. To achieve this, I have set the width of the items using calc() and ensured that the thumbnail image fills the entire div by applying the following CSS: ...

Select the dropdown menu to access the last line of the table

My custom dropdown is causing a scroll to appear at the bottom of the table when it's open, making it hard to view all the elements. I want to find a way to either expand the body of the dropdown or enlarge it so that this doesn't happen. Can any ...

What is the best way to incorporate JSON data into an HTML document?

Currently, I am working on a project involving the creation of a playable ad for Facebook. Per Facebook's ad specifications (), only a single HTML file under 2mb is accepted for uploading. This necessitates the inlining of all external references into ...

HTML does not occupy the entire width of the page

I'm struggling with an issue on my website where the <html> element doesn't span full width on mobile devices. Currently, I am using Bootstrap and Jquery for my website. If you have any insights on what may be causing this problem, please ...

Maximizing performance with internal Bootstrap?

An interesting concept to consider is that the fastest website could actually be an empty webpage. Each additional piece of data added compromises performance, yet it's the server's responsibility to send all the code to the client. When using ...

Guide on adding an image to a Bootstrap card component

I'm facing a simple issue that I can't seem to solve. As a beginner in using bootstrap, I'm struggling to figure out how to insert an image into the card header. I've been searching online for solutions for the past 30 minutes with no l ...

Obtain the printed value of a button via PHP and manipulate it using JavaScript

I have a dynamic table that displays results from a database. <table id="table" class="table datatable-responsive"> <thead> <tr class="bg-teal"> <th>#</th> <th>Date & Time</th& ...

Exploring the possibilities of maximizing, minimizing, resizing, and creating a responsive design in dialog boxes using jQuery UI JavaScript and

I'm trying to create a dialog with maximize, resize, and minimize buttons like those found in Windows OS. I want the dialog to be responsive and draggable as well. I've been using jQuery, jQuery UI, and extended dialog frameworks, but I haven&apo ...

Making a jQuery post request that returns JSON data

Is it possible to use the jQuery $.ajax method for making a POST request and sending data (e.g. page.aspx?var1=value) while also specifying that the expected response from the service will be in JSON format? var data = {name: _name, ...}; var request = $ ...

What is the best way to create a column that adjusts its width based on the row width in a table?

Here is the code snippet that I am working with: return ( <Box sx={{ height: 400 }}> <DataGrid columns={columns} rows={rows} /> </Box> ) Currently, my table appears like this: https://i.sstatic.net/KWXwL.png I am aiming for the ...

Numerous data points within PHP form/query

Before diving in, I want to mention that I have already tried searching for a solution, but none of the other questions were helpful in my case. I came across a code that seems to be perfect for my needs (here), but I am facing an issue when trying to fet ...

The Wonders of Flex Box and Media Queries

Can a website still be made responsive without relying on media queries when flexbox is already implemented? Are there specific scenarios where the utilization of media queries offers enhanced control? ...

Avoiding clashes between CSS styles in web applications

As I work on developing a web application that can be embedded on external websites, one of the challenges I am facing involves constructing dialogues with their own unique stylesheets. This could potentially lead to conflicts if both my dialogue container ...

Exploring a React JS option for filtering repeated elements, as an alternative to Angular

While using Angular JS, I came across the 'filter' option within ng-repeat which is useful for live search. Here's an example: <div ng-repeat="std in stdData | filter:search"> <!-- Std Items go here. --> </div> &l ...

Tips on how to direct the attention to a text box within a unique dialog, ensuring that the blinking cursor highlights the input area

Is there a way to set autofocus on a textbox when opening a custom dialog box? I've tried using the autofocus attribute for the input field, but it doesn't seem to work for me. Can anyone provide guidance on how to achieve autofocus for a textfie ...

Secondary sidebar remains static and is not visible

UPDATE: It's strange that even after commenting out <?php get_footer(); ?>, it still appears... perhaps the initial theme is executing something in the background? Just to clarify, I am utilizing the HTML5 / Starkers boilerplate theme: http://wo ...

Tips for Sending <Div> Data to a Servlet

I attempted to pass the content of an entire div in a form action URL using JavaScript. However, when I try to retrieve this request parameter as a String on the servlet side, it is returning [object Object]. Below is my code for the form and JavaScript: ...

Implementing beforeSend and complete in all instances of ajaxForm throughout the entire application as a universal

Is there a way to use the beforeSend and complete functions on all ajaxForms within a project without having to repeatedly insert the same code throughout the entire project? I have managed to achieve this by adding the following code for each form indivi ...

Adding information into multiple tables from a single table

I am looking to streamline the process of displaying tables with identical entries on multiple HTML pages. Is there a way to create the table in one place and then call it into other pages? Could it be done like this: <table id="table1"> <th ...

Exploring Netbeans 7.3 for Enhanced JavaScript Autocomplete with Parameters

Ever since the upgrade to netbeans 7.3, I've encountered an issue where netbeans no longer automatically provides me with parameter names. For instance, When I see "methodA(param1, param2) xxx.js" in the autocomplete pop-up, clicking on it or pressi ...