When the sidebar is set to position: fixed, the icons magically vanish

This CSS is specifically for the side navigation bar.

.side-nav {
  // position: sticky;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  width: calc(3.5vw + 3.5vh);
  // position: fixed;
  &.content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: map-get($background-colors, side-nav);
    &.logo {
      img {
        width: calc(3.5vw + 3.5vh);
        object-fit: cover;
      }
    }
    &.icons {
      // object-fit: cover;
      left: 0;
      bottom: 2.2rem;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-end;
      &.github {
        svg {
          height: 4rem !important;
          width: 4rem !important;
          background-color: map-get($icon-bg-colors, github);
          color: map-get($icon-colors, github);
          border-radius: 50%;
          &:hover {
            color: black;
            background-color: white;
          }
        }
      }
      &.linkedin {
        svg {
          height: 4rem !important;
          width: 4rem !important;
          background-color: map-get($icon-bg-colors, linkedin);
          color: map-get($icon-colors, linkedin);
          border-radius: 10%;
          &:hover {
            color: rgb(25, 25, 109);
          }
        }
      }

      &.stackoverflow {
        svg {
          height: 4rem !important;
          width: 4rem !important;
          // color: rgb(235, 152, 0);
          color: map-get($icon-colors, stackoverflow);
          &:hover {
            background-color: white;
          }
          &:active {
            color: red;
          }
        }
      }
      &.twitter {
        svg {
          height: 4rem !important;
          width: 4rem !important;
          // color: rgb(235, 152, 0);
          color: map-get($icon-colors, twitter);
          &:hover {
            background-color: white;
          }
          &:active {
            color: red;
          }
        }
      }
    }
  }
}

If the position is not fixed, this is how it will appear:

Changing only the position:fixed results in the following:

Answer №1

Upon further investigation, it appears that utilizing overflow-x:hidden was causing a conflict with the position:fixed. Previously, I had applied overflow-x:hidden to the body element. Upon removing this, the issue resolved itself.

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

Utilize a dynamic carousel with interactive lightbox functionality to display a stylish div containing captivating background

Is it possible to add a slick lightbox to a slider that only contains a div with a background image, but the lightbox doesn't display the image? What are your thoughts? $('.slider-for').slick({ slidesToShow: 1, slidesToScroll: 1, ar ...

Make the element switch from hidden to visible when hovering over it using CSS

I had a challenge to only show some rating text on my website when I hovered over it. Being new to coding with CSS and JavaScript, I was experimenting with overriding styles using the Stylebot extension in Chrome. I encountered an issue while trying to mo ...

What could be causing my webpage content to be partially hidden by my CSS menu?

I am currently working on my website which features a CSS menu with my website logo, a text box, and a dropdown. Additionally, I have created a login form using a table like the one shown below. <p>&nbsp;</p><table width="40%" border="0 ...

Unable to assign a className to a personalized React component - troubleshooting needed!

I have a component that relies on another component. I am trying to pass CSS positioning from the outer component to the inner one by using the following code: import OptionsMenu from './OptionsMenu' import { withStyles } from 'material-ui/ ...

Tips for designing the microphone appearance on the Google Chrome speech input interface

Google Chrome features an input control for speech recognition. If you want to know how to use it, check out this link. I'm looking to enlarge the microphone icon and possibly use a customized image for it. Increasing the width and height of the inp ...

A combination of fixed width column and dynamic content area in Bootstrap design

Is there a way to achieve the combination of fixed and fluid width columns using Twitter Bootstrap alone, similar to this example? The HTML and CSS in the example make it seem simple. But can this be done solely with Bootstrap? ...

Tips for extracting designated link by employing a Selector CSS Query

Please note: While a similar question has been asked on JSoup:How to Parse a Specific Link, I have a more specific variation of this inquiry. Kindly read on for further details. In order to extract data from a particular site link, I am looking to utili ...

"Finding the Perfect Alignment: How to Center Legends in Firefox

The issue at hand An issue has been identified where the code functions as intended in Chrome, Opera, and IE but fails to work in Firefox: fieldset>legend { display: table; float: none; margin: 0 auto; } <fieldset> <legend>Legend ...

Incorporating fontawesome icons ABOVE custom menu items in WordPress

In the process of customizing a menu in WordPress, I am looking to add fontawesome icons above each list item. In the past, I achieved this using the following code: <ul> <li> <a href="#"> <i class="fa fa-home"></i&g ...

Adjust the header's alignment to seamlessly coincide with the uppermost part of the

I'm encountering this peculiar issue with a website I recently started designing. My aim is to make the header perfectly aligned with the top of the page. However, despite my attempts, there persists a stubborn gap that measures around 20px, defying a ...

Finding a specific cell in a Django HTML table: tips and tricks

Recently delving into django and its intricacies. Struggling to grasp the concept of accurately pinpointing a specific cell within an html table. Yearning to modify the background color of select cells based on certain conditions derived from the generate ...

Space constraints within an li element

Is there a solution to resolve the unusual impact of margins/paddings? Check out this example on jsfiddle: jsfiddle. Here is the screenshot of the issue: i.imgur.com/64S8C.jpg. I want to eliminate any margins/paddings in the li element. ...

The webpage failed to show the hamburger menu

I'm trying to create a hamburger menu and have written the following code: <header class="header"> <nav class="flex flex-jc-sb flex-ai-c"> <a href="/" class="header__logo"> <img src="im ...

Emojis representing flags displayed on screen

Is there an option to display a flag icon? For example, I am able to write Hello ...

The functionality of changing the checkbox to "checked" by clicking on the span is not

How can I create a toggle button with a checkbox using css and jquery? Clicking on the span representing the toggle button should change the checked property of the checkbox. Currently, the span does not change the property, even though it triggers the c ...

"Arranging elements with identical class in a single column but on separate rows using CSS grid - a step-by-step guide

I'm facing an issue with organizing choices and matches in columns using grid CSS. Currently, the match column is overlapping with the choice column. Here is how it is coded at the moment: .grid{ display:grid; grid-template-columns: 1fr 1 ...

Using inline JavaScript to style an element when clicked

Looking for assistance with styling a link. I've connected an external stylesheet to my HTML file, so that part is all set. The goal is to modify the text-decoration when the onclick event occurs. Here's what I currently have: <a class="dopel ...

The jQuery function .val()/.text() is unable to retrieve information from a particular section of HTML

Implementing HandlebarsJS with PHP and Yii to generate a page. Here is a snippet of the html/handlebars code on the page {{#if embed_link}} <p class='f_hidden_p'> <a href='{{embed_link}}'> {{ ...

highlight the selected option in the ng-repeat list of items

Looking for some assistance with a coding problem I'm having. I keep running into an error when trying to make a selected item in an ng-repeat list highlight. The CSS style is only applied on the second click, not the first. Additionally, I need to en ...

While v-carousel adjusts to different screen sizes, the images it displays do not adapt to

Whenever I implement v-carousel, everything seems to be working well, but there is an issue on mobile. Despite the carousel itself being responsive, the images inside do not resize properly, resulting in only the center portion of each image being displaye ...