Disappearing fixed div in Chrome when hovering over links

I've encountered a strange issue while working on my website (beta.kylehorkley.com). When I hover over the links in the sidebar, the sidebar disappears momentarily and then reappears about a second later. This problem is occurring in Chrome and Opera browsers, but Firefox and Edge are working fine.

Here is the HTML code for the sidebar:

<div id="sidebar" class="sidebar">
    <a href="/" class="sidelink active">home</a>
    <a href="/contact/" class="sidelink">contact</a>
    <a href="/portfolio/" class="sidelink">portfolio</a>
    <a href="/about/" class="sidelink">about</a>
</div>

And this is the CSS code for the sidebar:

.sidebar {
    background-color: rgba(255, 255, 255, 0.95);
    height: calc(100% - 91px);
    overflow-x: hidden;
    position: fixed;
    top: 91px;
    left: 0;
    width: 100%;
    z-index: 999;
}

Lastly, here is the CSS code for the sidebar links:

.sidelink {
    border-bottom: 3px solid;
    border-bottom-color: transparent;
    color: rgb(50, 125, 150);
    display: block;
    font-family: "Varela Round";
    font-size: 20px;
    font-weight: 400;
    margin: 26px 24px 0 24px;
    opacity: 0.8;
    padding: 0 4px 11px 4px;
    text-transform: uppercase;
    transition: opacity .35s ease;
}

.sidelink:hover {
    opacity: 1;
    transition: opacity .35s ease;
}

.sidelink.active {
    font-weight: bold;
    opacity: 1;
}

Answer №1

If you're experiencing a disappearing issue with your div, try changing the color instead of adjusting the opacity. This solution has been tested and proven to work.

.sidelink {
    border-bottom: 3px solid;
    border-bottom-color: transparent;
    color:#a9c9d3;
    display: block;
    font-family: "Varela Round";
    font-size: 20px;
    font-weight: 400;
    margin: 26px 24px 0 24px;
    padding: 0 4px 11px 4px;
    text-transform: uppercase;
    transition: all ease 0.3s;
}

.sidelink:hover {
    color: rgb(50, 125, 150);
    transition: all ease 0.3s;
}

Simply replace your current class with the provided code above. By using the color hex code #a9c9d3, you'll achieve the same effect as setting the opacity to 0.8, resolving the disappearing div 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

Experiencing difficulties positioning svg text path in the center using CSS on desktop devices

I've looked into other SVG text questions, but I'm struggling to understand my mistake. Currently, I'm working on a live site at and implementing the following code: <svg class="svg-width desktop" style="margin:auto"> <path ...

What is the best way to ensure that my input values are saved when I reload the page?

I am trying to create a form where users can enter a name and a mark. The names and marks entered should be stored in an associative array when the submit button is clicked, as long as the mark entered is less than or equal to 100. If a mark greater than ...

Eliminate any additional spacing within the pre/code tags

I am currently utilizing prism.js for code highlighting. I have encountered an issue where there are unnecessary white spaces at the top and bottom of my output. You can view a live example here. <pre> <code class="language-css"> &lt ...

I am struggling with aligning the list items side by side

I am currently facing an issue with my list items that have anchor tags. They are currently set to display block with background images, but I want them to display inline. However, they are stacking on top of each other instead. The ul is being generated b ...

Update Calendar Information Without Reloading the Entire Page

Is there a way to automatically refresh a div that includes a FullCalendar Calendar? I'm looking to refresh the div every 30 seconds to check for new data from the database without having to modify the ViewModel or reloading the page. index.html &l ...

Issue with AngularJS URLs not functioning properly when using HTML5 mode

Utilizing the AngularJS SPA template in Visual Studio. In my app.js file, I have the following code: $stateProvider .state('touranalysis', { url: '/touranalysis', templateUrl: '/views/touranalysis/index', ...

HTML5 pattern grouping feature is not functioning as expected

I am attempting to validate this regular expression pattern="([a-zA-Z]+[0-9]*){4,}", which essentially means: It must always start with an alphabetic character. If a number is included, there must be at least 4 characters in total; for example, aaaa would ...

Aligning the up and down vote buttons in Bootstrap for small screens

I'm currently working on implementing a voting system similar to that of Stack Overflow. However, I'm facing an issue with displaying the arrows on smaller screens. I want the arrows to be positioned next to the text, just like on StackOverflow. ...

Is there a way to prevent one accordion pattern from automatically closing when another one is opened?

I'm currently working on a code that involves accordion patterns, and I've encountered an issue where opening and closing one accordion automatically closes another. I want all accordions to remain open until the user explicitly clicks to close t ...

Extracting information from an external website in the form of XML data

Trying to retrieve data from an XML feed on a remote website , I encountered issues parsing the XML content and kept receiving errors. Surprisingly, fetching JSON data from the same source at worked perfectly. The code snippet used for XML parsing is as f ...

Having trouble getting Javascript to reveal hidden elements based on their class

I am having some trouble making specific fields in a form appear based on the selection made from a dropdown menu. Below is a simplified snippet of my code, which should change the display from 'none' to 'block'. Can you help me figure ...

"Clicking on the radio button does not activate when placed within an <a> tag

Why is it that when the text is clicked, the radio button is checked, and when the little green patch is clicked, the frame is working, but they both don't work at the same time? Any assistance in resolving this issue would be greatly appreciated. ...

"Step-by-step guide for incorporating a right-to-left (RTL) Bootstrap

Is there a way to make my bootstrap navbar right-to-left (RTL)? I want the logo to be on the right and the links to flow from right to left. I've tried various tricks but none of them seem to work. Here's the code I currently have: <nav class ...

Chrome reload causing page to automatically scroll to bottom on my website

Could really use some assistance in solving this problem as I am completely stumped. I've noticed an issue on one of my websites when pages are reloaded. Every now and then (not consistently, which adds to the confusion), upon refreshing a page, it ...

Retrieve the value of a PHP array within a for loop and transfer it to JQuery

*edited format I came across a PHP code for a calendar on the internet and I am currently working on implementing an onclick event that captures the date selected by a user as a variable (which will be used later in a database query). At this point, my g ...

The unresponsive sticky navigation bar on a Joomla website is causing issues

I recently launched a new website that can be found here. The site includes the following JavaScript code: $(document).ready(function(){ $(window).bind('scroll', function() { var navHeight = $( window ).height() - 70; ...

When a key is pressed, apply a background color and fade out effect using JavaScript

Whenever the enter key is pressed, I want to make a red color appear briefly and then fade out quickly to create a blinking effect. I attempted adding a new class on Keypress that would transition the opacity to 0: function enterpressalert(e, text) { ...

The local storage is unavailable on Chrome Mobile due to null value being

My error reporting system is detecting issues with JS Web Storage failures specifically on Android devices using Chrome mobile. Interestingly, I have not been able to replicate this error on my own Android device. The error message that keeps popping up i ...

Struggling to get the knockout js remove function to function properly within a nested table structure

I've been encountering issues while trying to eliminate the formulation elements with the 'Delete comp' link. I can't seem to figure out why it's not functioning as expected. Moreover, the 'Add another composition' link o ...

What is a creative way to get rid of old content on a webpage using jQuery without relying on the

As I work on my crossword project, I have almost completed it, but encountering a problem. Within my HTML code, I have a select list that loads a .JSON file using Javascript. <form method="post" id="formulaire"> <div class="toto"> <sel ...