The issue of duplicate backgrounds appearing on the burger menu when adjusting the height

There seems to be an issue with my burgermenu; when I attempt to adjust the height, the background-color ends up duplicating.

.bm-menu {
    background-color: rgba(255, 255, 255, 0.9);
    height: 60vh;
    position: fixed;
    transition: top 0.3s;
    top: 50px;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 30px;
    z-index: 1001;
}


    <div className="bm-menu">
      <Menu isOpen={menuOpen} onStateChange={({ isOpen }) => toggleMenu(isOpen)}>
        <div className="menu-content">
          <a className="menu-item" href="#">Login</a>
          <Link to="/about" className="menu-item">About Us</Link>
          <a className="menu-item" href="#">Membership Plans</a>
          <Link to="/contact" className="menu-item">Contact Us</Link>
        </div>
      </Menu>
    </div>

Despite setting the height to 60vh as intended, it appears that there is an extra layer above the desired height that extends down the full viewport.

Do you have any recommendations or suggestions for resolving this issue?

I have attempted numerous solutions without success.

Answer №1

If you want to avoid any content overflow from impacting the background duplication, consider applying overflow: hidden; to the .bm-menu class.

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

CSS: Stack elements vertically based on their height (column-wise)

Looking for some help with designing a menu where the list items float in columns instead of rows. For example, This is how my current menu looks like: I want to change the layout to look like this: My code for the list items is as follows: .mnu-third ...

Arrange a stationary child in relation to the grandparent element

I created a small window within a browser window, containing an even smaller window with auto-scrolling text. However, I need some text in the smaller window to remain static and not scroll. Therefore, I used position_fixed which is absolutely related to ...

IE11 not running Angular code inline as expected

Currently in the process of developing an AngularJS application, I came across a strange issue that I have never encountered before. It may be a simple fix, but I am unsure of the exact terminology to search for the right solution, so I apologize in advanc ...

Setting Image Height with CSS

I have a div with a height of 105px. The image inside the div is 359px tall. How can I adjust the div's size to prevent cutting off the image and ensure it displays in full height? Thank you for your help! ...

Having trouble with the float not working for the main content below the sidebar? Stay tuned

Here is the layout I am working with: .page-wrapper { height: 100%; min-height: 970px; position: relative; } .pageheader { min-height: 50px; position: fixed; min-width: 100%; } .navbar-fixed-top { top: 0; } .page-sidebar { float: left ...

While utilizing a dynamic PHP navigation header, the nested divs are shifting below the container div

After successfully implementing a dynamic PHP header on my site, I encountered issues when trying to incorporate the remaining content within the container div along with the header div. The additional content is not displaying inside the container but is ...

Error message of DOMException related to Content-Security-Policy header encountered in Optimizely Web

Within our project, we have implemented Optimizely Web Experiments integration to conduct A/B testing. The Optimizely Web Editor offers a convenient way to modify the variants of these tests directly within the browser. However, in order to enhance securi ...

Vertical tab design in Bootstrap does not automatically switch tabs

I'm managing two separate tab boxes that switch content when clicked or over a 5-second period. https://i.sstatic.net/Ujz9H.jpg https://i.sstatic.net/sFc1K.jpg The left box is functioning correctly, but the right box is changing the active state wit ...

React Native: The behavior of the 'top' property is consistent, while the 'bottom' property is not performing as anticipated

Within my React Native application, I have implemented the following code: <View style={{ width: 50, height: 50, borderWidth: 1, }} > <View style={{ width: 5, height: 5, backgroundColor: 'red', top: 10, ...

Customizing MUI V5 Variants

I'm having trouble customizing the variant options in MUIPaper, and I can't figure out what mistake I'm making. The available types for the component are: variant?: OverridableStringUnion<'elevation' | 'outlined', Pape ...

Ways to Ensure the Footer Stays Beneath Your Image Gallery

After successfully keeping the footer at the bottom of other pages on my website, I'm facing a challenge with my photo gallery page. The footer stubbornly sits in the middle of the page. :( This is the HTML code for that particular page: html { ...

What could be the reason for my Form styling failure?

Currently working on freecodecamp's portfolio creation exercise. It should be a straightforward task, but I'm facing a small issue that's puzzling me. I'm trying to remove the border and outline (when focused) from my contact-area form ...

How can I eliminate a class when the scrollTop() position matches a specific div element?

I am trying to implement a script that will allow me to scroll to my navigation and then change the class of the navigation, however, it is not working as expected. $(window).scroll(function() { if ($(window).scrollTop == $('.menu_nav').offs ...

A guide to displaying dropdown values above a modal

I have encountered an issue while using a dropdown inside a modal window. The problem is that not all the dropdown values are visible, as the overflow part gets hidden. I am looking for a solution to keep the dropdown value at the top and prevent it from b ...

Attempting to troubleshoot the issue regarding create-react-app error

Every time I attempt to run npx create-react-app my-app, I encounter the same frustrating error message: An error arises stating that a template was not provided. It seems likely that this issue stems from using an outdated version of create-react-app. Pl ...

Address the Firebase error using the router action handler

I am facing an issue with handling Firebase Authentication Errors because the function is at the top level, preventing me from using Usestate. I need to find a way to display the error in the JSX. I have tried various methods such as using arrays push and ...

Trouble with Materialize CSS: Form elements displaying incorrectly

I attempted to implement a login form within a modal, following the example provided here (https://codepen.io/skcals/pen/bxdpaN). However, when I applied the same code to my own website, this is how it appeared: Has anyone else encountered this issue? And ...

What is the best way to utilize the bootstrap grid system for smaller screens while incorporating a table?

I have a PHP generated table that retrieves data and dynamically displays it in a table. It is crucial to ensure that the table data adjusts according to the screen size. Below is the code snippet: echo "<div class='container'><div cla ...

Achieving unique proportions with HTML5 video resizing

On my page, I plan to showcase a video specifically for desktop browsers. I have devised some code to determine whether the video is in landscape or portrait orientation. The challenge lies in deciding what to do based on this orientation: If the video is ...

Tips for automatically displaying the first option as selected in an HTML Select dropdown

I have an HTML select element where I want the option chosen by the user to not be displayed in the box. Instead, I would like the box to always show the first option, regardless of what the user selects from the dropdown menu. Below is my CSS code for sty ...