Excessive-y does not have scrolling capabilities

I'm having an issue with the overflow-y: scroll property under the "Online Contacts" section in my code. It's not working as expected, but when I change the position to absolute and make certain adjustments, it starts working. I'm using Bootstrap 4 for this project and can't seem to figure out what's causing this bug.

Here is the code for reference: https://jsfiddle.net/hdesh7/rL43unfj/1/

Below is the HTML code snippet:

<html lang="en">

<!---Importing Bootstrap and CSS File--->
<head>
    <title>Dashboard</title>
    <link rel="stylesheet" href="dashboardstyle.css">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
    <link href='https://fonts.googleapis.com/css?family=Dancing Script' rel='stylesheet'>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>

<body>

    <!---Nav Bar and Header--->
    <section id = "top">

        <!---Header--->
        <div class="container-fluid topbar">
            <h1 class="float-left logo">Example</h1>
            <h5 class="float-right out">log out</h5>
            <img src="blank-person-male.png" alt="profilepic" class="rounded-circle float-right holder"></img>

        </div>

        <!---Nav Bar--->
        <div class="container-fluid menu" id = "openMenu">
            <div class="row">
                <div class = "col-2 text-center">
                    <i class="fa fa-tachometer fa-2x icon icon-1" aria-hidden="true"></i>
                    <h5 class = "txt txt-1">Dashboard</h5>
                </div>

                <div class = "col-2 text-center">
                    <i class="fa fa-user fa-2x icon icon-2" aria-hidden="true"></i>
                    <h5 class = "txt txt-2">Profile</h5>
                </div>

                <div class = "col-2 text-center">
                    <i class="fa fa-certificate fa-2x icon icon-3" aria-hidden="true"></i>
                    <h5 class = "txt txt-3">Certificates</h5>
                </div>

                <div class = "col-2 text-center">
                    <i class="fa fa-paper-plane fa-2x icon icon-4" aria-hidden="true"></i>
                    <h5 class = "txt txt-4">Send/Apply</h5>
                </div>

                <div class = "col-2 text-center">
                    <i class="fa fa-cog fa-2x icon icon-5" aria-hidden="true"></i>
                    <h5 class = "txt txt-5">Settings</h5>
                </div>

                <div class = "col-2 text-center">
                    <i class="fa fa-envelope fa-2x icon icon-6" aria-hidden="true"></i>
                    <h5 class = "txt txt-6">Messages</h5>
                </div>

            </div>
        </div>

    </section>

    <section class = "rest container">

        <h2 class = "text-center"><u>Dashboard</u></h2>


        <!---Contacts--->
        <h4>Online contacts:</h4>

        <div class = "row contact">


...

CSS:

html{
    overflow-y: scroll;
}


#top{
    top: 0;
    position: sticky;
    z-index: 1;
}


.topbar{
    height: 90px;
    background-color: #24414e;
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 0px;
    /*
    animation-name: greeting;
    animation-duration: 8s;
    animation-delay: 1s;
    */
}

@keyframes greeting{
    0%{
        background:url('https://cdn.dribbble.com/users/751466/screenshots/3360272/hello-3.gif');
        background-size: 100% 100%;
    }
    60%{
        opacity: 1;
    }
}

...

Answer №1

The problem arises from using z-index: -1 in the .rest class (which is assigned to the section element).

When the code is removed, everything functions properly.

Answer №2

The reason you are unable to scroll is because there is another element with a higher z-index value blocking it. Specifically, .rest has a z-index of -1.

To fix this issue, adjust your z-index values so that the scrollable container has a higher z-index.

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 there a way to create a div that resembles a box similar to the one shown in the

Hello, I am attempting to achieve a specific effect on my webpage. When the page loads, I would like a popup to appear at the center of the screen. To accomplish this, I have created a div element and initially set its display property to 'none'. ...

CSS - Choosing between Background Size Contain or Default Size

Is there a solution to my dilemma regarding background images in a div? I need the image to be contained within the div if it's larger (background-size:contain;), but if the image is smaller, I want to keep it as is without stretching or blurring (bac ...

Find the current location of the scroll bar on the view port

Currently, I am utilizing the Addazle React grid for my project. However, I need to incorporate endless scrolling functionality which is not already included in this grid system. Thus, I am tasked with devising my own solution for this issue. To successful ...

How do I input text into a Google Doc using an XPATH or element that is difficult to manipulate?

I'm currently working on a Python code that is designed to automatically open a Google Doc and input a specific set of combinations for a predetermined length. While I've successfully created the code to navigate to my Google Docs and open a new ...

locate the following div using an accordion view

Progress: https://jsfiddle.net/zigzag/jstuq9ok/4/ There are various methods to achieve this, but one approach is by using a CSS class called sub to hide a 'nested' div and then using jQuery to toggle the Glyphicon while displaying the 'nest ...

"Refine Your Grid with a Pinterest-Inspired

I've set up a grid of images in columns similar to Pinterest that I would like to filter. The images vary in height but all have the same width. The issue arises when a taller image is followed by a shorter one, causing the short image to float right ...

Tips for accessing the @keyframes selector and extracting the value from it

In my CSS code, I have a shape element with an animation that spins infinitely for 50 seconds. #shape { -webkit-animation: spin 50s infinite linear; } @-webkit-keyframes spin { 0% { transform: rotateY(0); } 100% { transform: rotateY(-360deg ...

Swap out the content within the selected element

Let's imagine we have the following shopping list: export default { data() { return { items: { Apple, Orange, Appricot } } } } <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js" ...

Can you identify the animation being used on this button - is it CSS or JavaScript?

While browsing ThemeForest, I stumbled upon this theme: What caught my eye were the animation effects on the two buttons in the slider ("buy intense now" and "start a journey"). I tried to inspect the code using Firebug but couldn't figure it out com ...

Tips for passing values and their corresponding labels during a click event in Angular 4

When I click the plus button, I want to hide the li element. Even though the data is passing correctly, the li element is not clearing as expected. The desired outcome is for the li instance to be removed once the plus button is clicked. https://i.stack.im ...

django displaying a blank screen

I'm having trouble with the code, forms.py from django.form import datetime, widgets import datetime import calendar from bootstrap_datepicker.widgets import Datepicker class DateForm(forms.Form): date_1=forms.DateTimeField(widget=DatePicker( ...

Determining the position of the selected option in an Angular 2 Select menu

Is there a way to retrieve the position of the selected option in a similar manner to the index of a table? Example for a table: <tr *ngFor="let car of cars; let i = index" (click)="showTabs(i)"> <td>{{i+1}}</td> </tr> I am lo ...

Endless loop of jquery textbox focus event

Currently, I am employing jQuery for validating textbox values. I have two textboxes - txt1 and txt2. For this purpose, I have created a jQuery function: $("#txt1").blur(function () { if ($("#txt1").val() == "") { $("#scarrie ...

Checking the opacity with an if/else statement, then adding a class without removing the existing class

This function is designed to check the opacity of the header, which fades out as a user scrolls down. If the opacity is less than 1, it disables clickability by adding the class "headerclickoff". However, there seems to be an issue with removing the clas ...

Creating a nested JSON structure by fetching data from a remote source

i'm looking to populate the json file located at through a get request. This json contains music from various churches in different cities, with data organized into multiple levels. I want to parse this data using jquery and utilize hidden div elemen ...

`Carousel nested within tabbed interface`

I am currently facing an issue with my website's tabs and carousels. I have 4 tabs, each containing a carousel, but only the carousel in the first tab seems to be working properly. When I activate the second tab, all the carousel divs collapse. For r ...

Tips on activating the CSS style while typing using the onChange event in React

Is it possible to dynamically adjust the width of an input as we type in React? Currently, my input has a default width of 1ch. I would like it to increase or decrease based on the number of characters entered, so that the percentage sign stays at the end ...

Developing a desktop app using HTML5

I'm starting out with HTML (specifically HTML5) and I'm interested in developing a desktop widget using HTML5 without having to rely on running it within a browser. Are there any software development environments available that can assist with th ...

Header with absolute positioning doesn't play nice when nudged in Chrome

Take a look at the HTML page on this JSFiddle link: http://jsfiddle.net/rb8rs70w/2/ The page features a "sticky" header created using CSS with the property position: absolute. ... <body class="body-menu-push"> <header role="banner"> ...

Error: An error occurred due to an unexpected asterisk symbol. The import call only accepts one argument in Posenet

While attempting to utilize posenet on a python http server, I encountered a syntax error in the camera.js file at this specific line. import * as posenet from '@tensorflow-models/posenet'; This piece of code has been cloned from the following G ...