Floating and scrolling navigation bar not functioning properly in bootstrap framework

I've been dabbling in coding for a while now, practicing at my current job. I managed to create a floating and scrolling navigation bar on the right side of my website using bootstrap. However, after taking a 3-week break and returning to my site, I noticed that the navigation bar had suddenly stopped working (without any code changes). I've looked through the code multiple times but couldn't pinpoint why it broke. Any thoughts or suggestions?

Here is an older image of the website with the functioning right-hand navigation bar. The bar used to change color while scrolling and always stayed on the right side of the page (floated).

Edit: This is how the broken right bar currently looks (aligned along the top of the screen without floating or scrolling)

Edit 2: Upon further inspection, I found that everything works fine in Microsoft Edge and Internet Explorer 10, but there seems to be an issue in Google Chrome (I couldn't test other browsers).

Stylesheet Code

.rightjump {
    margin: 0;
    padding: 10px 10px 0px 0px;
    list-style-type: none;
    width: 180px;
    position: fixed;
    overflow: auto;
    display: contents;
    right: 0;
}

.rightjumplist {
    display: block;
    background-color: greenyellow;
    padding: 8px 8px;
    text-decoration: none;
    color: black;
    text-align: center;
    border-bottom: 1px solid black;
    border-radius: 5px 40px 5px 40px;
}

.rightjumplist:hover {
    background-color: lightgray;
    color: black;
}

.activelist.active {
    background-color: forestgreen;
    color: black;
}

Main HTML Code:

<!DOCTYPE HTML>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
<link rel="icon" href="images/logo-small.png">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<title></title>
</head>
<body data-spy="scroll" data-target="#myScrollspy" data-offset="50">

    <!--#Floating verticle contents bar-->
    <nav>
        <ul class="leftcontents">
            <li class="leftcontentslist" style="background-color: lightgray"><img src=images/logo-large.png width="155px" height="155px"></li>
            <li class="leftcontentslist"><a id="a01" href="home.html">Home</a></li>
            <li class="leftcontentslist"><a id="a01" href="horizon1.html">New Horizon 1</a></li>
            <li class="leftcontentslist"><a id="a01" href="horizon2.html">New Horizon 2</a></li>
            <li class="leftcontentslist"><a id="a01" href="horizon3.html">New Horizon 3</a></li>
            <li class="leftcontentslist"><a id="a01" href="try1.html">We Try 1</a></li>
            <li class="leftcontentslist"><a id="a01" href="try2.html">We Try 2</a></li>
            <li class="leftcontentslist"><a id="a01" href="can1.html">We Can 1</a></li>
            <li class="leftcontentslist"><a id="a01" href="can2.html">We Can 2</a></li>
        </ul>
    </nav>
    <!--#Floating verticle jump bar (right)-->
    <nav class="navbar navbar-inverse" id="myScrollspy">
        <ul id="navbar" class="rightjump nav nav-pills nav-stacked">
            <li class="active activelist rightjumplist"><a id="a01" href="#Top">Top</a></li>
            <li class="active activelist rightjumplist"><a id="a01" href="#Bingo">Bingo</a></li>
            <li class="active activelist rightjumplist"><a id="a01" href="#Wordsearch">Wordsearch</a></li>
            <li class="active activelist rightjumplist"><a id="a01" href="#PDF1">Activity</a></li>
            <li class="active activelist rightjumplist"><a id="a01" href="#PDF2">Activity 2</a></li>
        </ul>
    </nav>


</html>

If there are any inaccuracies, please forgive me as this is my first time posting here. Thank you for your assistance! ^^

Answer №1

Upon initial inspection, it appears that the display setting on your "rightjump" element is not configured correctly. The current state is as follows:

.rightjump {
margin: 0;
padding: 10px 10px 0px 0px;
list-style-type: none;
width: 180px;
position: fixed;
overflow: auto;
display: contents;
right: 0;
}

The desired configuration should be:

.rightjump {
margin: 0;
padding: 10px 10px 0px 0px;
list-style-type: none;
width: 180px;
position: fixed;
overflow: auto;
display: block;
right: 0;
}

Please note that the change made here was from display:contents to display:block. Hope this resolves the issue!

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

KnockoutJS - Using containerless control flow binding with predefined values

Inside a select control, I am using ko:foreach instead of the usual bindings. Everything is working perfectly, except that the initial value for "specialProperty" is set to unknown even when the select control is set to Option 1. It behaves as expected o ...

The SrollToTop function is ineffective when used with a component in Ionic 6/Angular

Recently, I implemented a fabbutton feature that allows users to scroll to the top of a page with just one click. Initially, I tested this functionality without using it as a component, and everything worked perfectly. However, now I want to turn this fabb ...

The :before pseudo element doesn't seem to be functioning properly on Internet Explorer 11

The following code works well in Chrome and Mozilla, but unfortunately does not function correctly in IE11. I am attempting to apply a background color on hover to a div with the class .border-green, however this functionality is failing specifically in ...

Distinguish between datalist selection and text input in BootstrapVue Autocomplete

When looking at the code snippet provided below, I'm trying to figure out the appropriate event/method to determine whether the value entered in the input field was manually typed or selected from the <datalist>. SAMPLE CODE: <div> &l ...

javascript the unseen element becomes visible upon page loading

my website has the following HTML snippet: function getURLParameters() { var parameters = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { parameters[key] = value; }); return param ...

How to dynamically change the color of an AngularJS element based on a condition?

As someone who is new to AngularJS, I am currently working on changing the color of a table element to yellow if the user has voted on a specific choice. <div ng-show="poll.userVoted"> <table class="result-table"> <t ...

Achieving the extraction of a particular string from an HTML element using JavaScript

<input id="WD01B3" ct="CB" lsdata="{2:'WD01B4',4:'Any',20:'\x7b\x22WDA_TYPE\x22\x3a\x22DROPDOWN_BY_KEY\x22,\x22WDA_ID\x22\x3a\x22ABCA950297D2C0C432BAB9BB ...

"Although disabled, input elements can still be focused on in Firefox browser

Illustrative example let userInput = document.createElement("input"); userInput.id = "user-input"; userInput.type = "number"; userInput.className = "user-number-input"; userInput.disabled = true; document.body.appendChild(userInput); .number-inp ...

Android WebView does not support rendering Persian fonts

I am having an issue with applying a Persian font to my html content, which contains both Persian and English text. The CSS is correctly applied except for the font itself. In the CSS, I have defined the font-face like so: @font-face{ font-family ...

What steps can be taken to ensure that the onchange event functions properly with radio input

I am facing an issue with my input field as the value changes automatically when an option is selected. However, I want this functionality to also work the same way when a radio input option is selected. How can I modify the code to achieve this? func ...

jQuery's class selector does not work for dynamically added labels

The HTML code appears to be: <label for="13"> <input id="13" value="13" type="radio" name="choice">S1&nbsp;&nbsp;&nbsp;S1&nbsp;&nbsp;&nbsp; </label> <label for="14"> <input id="14" value="14" typ ...

Is there a way I can align these items in the center of the span?

Issue at Hand: The SVG and text elements are not aligning to the center of my spans as desired. Attempts Made: I have experimented with different display modes, used margin properties for alignment, and tried adjusting text-align. I even searched for so ...

The select2 plugin seems to be having trouble recognizing the Li click functionality

I have a select menu that is using the select2 plugin. I am trying to add a class to the <select> element when a menu option is clicked, but it doesn't seem to be working as expected even after testing with an alert. https://jsfiddle.net/ysm4qh ...

Issues with Skrollr JS on mobile device causing scrolling problem

Currently facing an issue with Skrollr js. It is functioning perfectly in web browsers and mobile devices. However, there seems to be a problem when tapping on a menu or scrolling down arrow as it does not initiate scrolling. Assistance would be greatly ...

Title with lower border shorter than width

Looking to achieve an underline effect with a bottom border that is narrower than the width of the h2 title. Though I typically avoid uploading images, here is one to provide further clarification of my question: ...

The integration of Express server with static ejs files, CSS, and JavaScript is experiencing technical difficulties

I am currently working on a website using node.js and have created two routes: /home and /contact. Everything was functioning properly until I added CSS and JS files to both routes. For some reason, the second call does not work as expected. When I access ...

What causes the slight shifting of on-screen elements when the doctype is removed from an HTML document?

During the process of converting from HTML4 to HTML5, I compared my html4 and html5 pages and noticed that removing deprecated elements after the doctype declaration was causing slight movements in on-screen elements. For example, in the code snippet below ...

Is there a way to send a multi-dimensional array using jQuery ajax?

I am encountering an issue with posting an array as a JavaScript variable {{0,0},{1,1},{2,2}} using JSON.Stringify. Whenever I try to post it, I receive an internal server error 500. Can someone please advise on how I can successfully post and utilize this ...

Creating circular borders in CSS: A step-by-step guide

Is it possible to create a circular border in CSS? Currently, the shape is square but I would like it to be circular. color: white; left: 52px; position: absolute; top: 65px; padding: 3px; background-color: rgb(0, 195, 255); ...

The functionality of Ajax loading content will fail when the link is already loaded

I am currently using an ajax script that dynamically replaces the content of #main with the contents of a loaded page based on the clicked link. For example, clicking on rddd would replace #main with the content of about.php. However, I encountered an is ...