Issues with scrolling and responsiveness in a website caused by jQuery and JavaScript errors

I'm currently working on a portfolio site and using Scrollit.js, jquery-1.10.2.min.js, and a Responsive Grid System to create it. However, things are not going as smoothly as I had hoped. Here is what's happening:

^There seems to be some unexpected blue color showing up, especially in larger windows.

^This issue isn't too big of a deal.

^The real problem arises here. The background should be white, but there's unwanted blue peeking through at the top and bottom. This issue persists even in smaller windows.

^It's just so frustrating!

I've been struggling with this for hours, going back and forth with my code. I'm stuck and not sure what steps to take next. If anyone could provide some guidance or suggestions, I would greatly appreciate it! You can find the code on this fiddle: http://jsfiddle.net/p28w9/ I believe the problem lies within this CSS snippet, but I can't quite pinpoint it, which is why I need some assistance. >.<

/*  SECTIONS  */
section {
    padding-top: 60px;
    height: 838px;
    width: 100%;
}

#work {
    margin-top: 200px;
    padding: 50px;
}

section:nth-child(odd) {
    padding-top: 260px;
    height: 320px;
    background-color: #1ab7ea;
    color: #fff;
}

/*.section {
    clear: both;
    padding: 0px;
    padding: 20px;
}*/

section .content {
    margin: 160px auto;
    max-width: 640px;
}

Answer №1

One issue that stands out to me immediately is the height you have set for your sections. I suggest using a minimum of 1200px in height and keeping the padding-top consistent across all sections.

section {
padding-top: 80px;
height: 1200px;
width: 100%;
}

Additionally, avoid adding extra height or padding to your section nth-child as it could be disrupting your scrolling functionality. The following CSS should work well:

section:nth-child(odd) {
background-color: #1ab7ea;
color: #fff;
}

Another point to consider is that resolutions higher than 1200px on the Y Axis may cause part of the next page to show at the bottom of the previous page. Before developing your portfolio, determine the maximum resolution you want your website to support effectively.

I hope this advice proves helpful,

Best regards,

Thanos

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

Minimize excessive looping through the same array in React and JSX code

Imagine I have an array of objects like this: const itemsArray = [ { "year": 2000, "text": "Lorem ipsum" }, { "year": 2010, "text": "Hello World" }, { "year": 2020, "text": "This is the end" } ]; Let's say I want to use this array to create el ...

div value causing erratic behavior in cycling process

Instead of following the normal balance calculation (1000-950), something odd happens and the balance goes from 1000 to 0 with the while loop. I never intended for the refBalance to drop below 0. (numDebit2() returns 50) <div class="elemen ...

Provide the succeeding line from a CSV document whenever a PHP script is executed

I have implemented highcharts to generate a real-time chart with data that updates dynamically. The chart makes an AJAX call to a PHP file which is responsible for parsing a CSV and returning the output as JSON. Below is my Highcharts/jQuery code: functi ...

Combining an attribute selector with a variable results in a syntax error

Although this code is functioning properly and the class is successfully added, an error message is being displayed. console.log(key); //first_date $('*[name='+key+']').addClass('error'); ERROR: Uncaught Error: Syntax er ...

Resize images in PHP and MySQL with precision without distorting the image

I'm looking for a solution to resize images on upload without deforming them. The current code uploads the image and stores it in the database, but I need to add resizing functionality. I'd prefer not to use JavaScript, but if necessary, please i ...

`Custom transitions between sections using fullpage.js`

Has anyone used the fullpage.js extension to achieve an animation similar to this one, where sections are destroyed on scroll? ...

JavaScript encountered an error stating "phone is not defined" due to an uncaught ReferenceError

Whenever I click on the Phone Number, it displays an error message saying that the function is not defined. How can I fix this issue? Thank you in advance! Here's the code snippet: <div class="product-label"> <h4><?php echo $p["Fu ...

Adding an image to a two-column layout with text

Seeking assistance with my website creation using HTML, CSS, and jQuery. Currently, I have a text layout formatted in two columns with an image placed before the text as shown below: <div> <div style="float:right"> <img src="ima ...

Space separating the text and underline

Can anyone explain why padding-bottom or margin-bottom does not seem to have any effect on the underline in the li > a:before section? I tried adding padding-bottom but it doesn't create any space. Any suggestions? ul { list-style-type: none ...

What strategies can be employed to generate new subpages when there are modifications to the API (in JSON format

I would like to incorporate data from the Mixcloud API (an audio hosting service similar to SoundCloud) to automatically generate new subpages whenever a new post is published on Mixcloud. My current project involves creating a website for a podcast. The ...

Attempting to start and restart an asynchronous function using setIntervalAsync results in a TypeError because undefined or null cannot be converted to an

Recently, I've been working on creating a web scraper that utilizes data extracted from MongoDB to generate an array of URLs for periodic scraping using puppeteer. My goal is to make the scraper function run periodically with the help of setIntervalAs ...

Guide to implementing an animate-on-scroll feature for data retrieved in a React application

Background: I am trying to implement an AOS-effect on multiple divs that are populated with data from a server and rendered after the initial load: import {useEffect, useState} from "react"; export const Test = () => { const [data, setData] = u ...

Vue-router vulnerability allowing for DOM-based open redirects

I am currently working on a Vue application that was created using Vue-cli. Vue version: 2.6.11 vue-router version: 3.2.0 Link for Reproduction https://github.com/keyhangholami/dom-based-open-redirect Instructions to replicate To reproduce the i ...

React-native horizontal sliding plugin

Can anyone recommend a reliable horizontal slider plugin for react-native? I've come across some options, but they haven't been working as smoothly as I'd hoped. ...

Troubles encountered with webserver authentication while attempting to view webserver material using UWP WebView

In my IoT Core app development project, I am faced with the challenge of displaying webpages from a remote Apache webserver. The WebView class method .Navigate() has been effective for accessing non-protected pages, but I am struggling to figure out how to ...

Ways to hide menu click when hovering over it

As a beginner, I have created a menu that shows options on hover and click. However, I am encountering an issue where clicking on one menu option and then hovering over another menu creates two lists of options. Is there a way to make the clicked menu opti ...

What steps can be taken to avoid the destruction of an object following its use of the .load() function in JavaScript (specifically in three.js)?

I'm facing an issue with preventing the destruction of my object after loading it. var loader = new THREE.ColladaLoader(); var rescue; loader.load( 'Improved_Person_Maker_better_quality.dae', function(collada) { scene.add(co ...

Bootstrap navbar-fixed-top is experiencing issues with background gradients not displaying properly

Why are background gradients not working with Bootstrap 3.0 navbar-fixed-top or bottom, only default? html, body { height: auto; width: 100%; overflow-x: hidden; } body { background: #000000; /* fallback for old browsers */ backgrou ...

Securing a fixed path in Express and Nodejs: Best practices

Using the latest versions of Node and Express, I have organized my project into two folders: public and secured. I want to restrict access to the secured folder to only authenticated users. I have implemented a custom login system, but now I am unsure of ...

Utilizing one JavaScript file and consistent classes for multiple modals

Is it possible to have multiple modals using the same JS file, classes, and IDs? I created this code: <button id='myBtn'>Order/Discount</button> <div id='myModal' class='modal'> <div clas ...