The drop-down menu fails to appear when I move my cursor over it

#menu {
overflow: hidden;
background: #202020;
}

#menu ul {
margin: 0px 0px 0px 0px;
padding: 0px 0px;
list-style: none;
line-height: normal;
text-align: center;
}

#menu li {
display: inline-block;
}

#menu a {
display: block;
position: relative;
padding: 0px 100px 0px 40px;
line-height: 70px;
letter-spacing: 2px;
text-decoration: none;
text-transform: uppercase;
text-align: center;
font-family: 'Varela Round', sans-serif;
font-size: 13px;
color: rgba(255,255,255,0.5);
border: none;
}

/* Dropdown Content (Hidden by Default) */
#menu .dropdown-container{
position: relative;
}
#menu .dropdown {
position: relative;
display: inline-block;

  }
#menu .dropdown-content {
position: absolute;
display: none;
background-color: #202020;
min-width: 160px;
z-index: 9999;
box-shadow: 0px 8px 16px 0px rgba(255,255,255,0.5);
  }
  
  /* Links inside the dropdown */
#menu .dropdown-cotainter a {
color: rgba(255,255,255,0.5);
padding: 3px;
position: relative;
text-decoration: none;
display: Block;
z-index: 9999;
  }
  
  /* Change color of dropdown links on hover */
#menu .dropdown-content a:hover {color: #ddd;}
  
  /* Show the dropdown menu on hover */
#menu .dropdown:hover .dropdown-content {
display: block;
z-index: 9999;
}
import React from 'react';
import {
  Link
} from 'react-router-dom';

function Header() {
  return (
    <div id="header-wrapper">
      <div id="header" class="container">
        <div id="logo">
          <img src="images/poli.png" height="200" alt="" />
        </div>
      </div>
      <div id="menu" class="container">
        <ul>
          <li><Link to="/">Homepage</Link></li>
          <li>
            <div class="dropdown">
              <a>Services</a>
              <div class="dropdown-container">
                <div class="dropdown-content">
                  <a>Link 1</a>
                  <a>Link 2</a>
                  <a>Link 3</a>
                </div>
              </div>
            </div>
          </li>
          <li><Link to="/AboutUs">About Us</Link></li>
          <li><Link to="/ContactUs">Contact Us</Link></li>
        </ul>
      </div>
    </div>
  );
}

export default Header;

Upon hovering over the link, only a portion of the menu is visible and I believe it's due to the container covering it. I'm unsure how to make the menu independent or positioned above the container for full visibility. I attempted changing the position to absolute without success. Any assistance would be appreciated!

Answer №1

By taking out the overflow: hidden line, your code will function correctly.

#menu {
    overflow: hidden; //delete this line
    background: #202020;
}

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

After a period of time since the server has been initialized, the function req.isAuthenticated() no

In my Node.js routes.js file, I have a function implemented to check if a request is isAuthenticated before serving it: function isLoggedIn(req, res, next) { if (req.isAuthenticated()) { console.log('Session Expiry '+req.session.cook ...

How can I combine an onkeypress and onclick event listener in one method?

I have two inquiries, somewhat intertwined. 1) Is it feasible to merge the 2 functions below into a more efficient function, or do I need to create a function and then call it in both event listeners? input.addEventListener("keyup", () => { if (eve ...

How can I effectively halt the influx of streaming updates from an RTKQ?

Attempting to invoke an unsubscribe function: unsubscribeFromThingIds(arg.tids); following the await cacheEntryRemoved; statement in this specific example. The definition of the function is as follows: export const unsubscribeFromThingIds = (tids: string ...

accessing the php script within a node environment

Hey there! I'm currently working on creating a chat system using socket.io, express.io, and node.js. So far, everything has been going smoothly as I've been following the documentation provided by these tools. However, when I attempt to integrat ...

Namespacing is not applied to dynamic modules in Vuex

I've been tackling a modular vue application that enrolls the modules during compile time. Take a look at the code snippet below - app.js import store from './vue-components/store'; var components = { erp_inventory: true, erp_purc ...

Using jQuery to strip inline styling from copied webpage content

When I copy content/paragraph from Wikipedia and try to paste it as code on my webpage dynamically, it ends up with a lot of inline styles. I want the code to be clean and properly formatted in HTML. I have tried several methods, but they remove all the ta ...

Invoking a Method in a React Component from its Parent Component

I am new to React and I have a question regarding how to call a method from a child component within the parent component. For example: var ChildClass = class Child { howDoICallThis () { console.log('Called!') } render () { retur ...

Saving vast array in MongoDB

I am currently working on a personal project that involves implementing a search feature. My setup includes using typeahead.js with a REST api created in expressJS and mongoDB. I could use some guidance on two particular challenges I am facing. While my ba ...

The magic of CSS Pseudo-classes in Inline Styling

For the longest time, I've been under the impression that you cannot include in-line :hover{..} styles to an element. However, recently I stumbled upon this page which showcased examples like this. <a href="http://www.w3.org/" s ...

Optimizing performance: Enhance readback operations in Canvas2D by enabling the willReadFrequently attribute for faster getImageData processing

I am currently utilizing the react-wordcloud package and encountering an issue where the word cloud adjusts to fit 70% of the screen size whenever the container size changes. My console is being flooded with this warning message: https://i.sstatic.net/vdV ...

css determining the width through calculation

I am facing a challenge with a math problem. My content box is 700 pixels wide, and my hentry (inside content) is 100% wide with padding of 10 pixels. This causes the hentry to be wider than the content, resulting in an overflow... Does anyone have a so ...

The issue with Material-ui popover state not functioning properly

I utilized the material-ui-popup-state library to implement customized menus on my header. The code I'm using is similar to what's provided in the official documentation, with the difference lying in the content of the popover. In my case, the po ...

Retrieve both the name and id as values in an angular select dropdown

<select (change)="select($event.target.value)" [ngModel]="gen" class="border border-gray-200 bg-white h-10 pl-6 pr-40 rounded-lg text-sm focus:outline-none appearance-none block cursor-pointer" id="gend ...

Upon attempting to utilize Socket.io with Next.JS custom server, the server repeatedly restarts due to the error message "address already in

Every time I attempt to execute the refreshStock() function within an API endpoint /api/seller/deactivate, I encounter the following error: Error: listen EADDRINUSE: address already in use :::3000 at Server.setupListenHandle [as _listen2] (net.js:1318: ...

Guide on how to iterate through the list of users within the component

Hello, I'm fairly new to working with react and I've encountered a challenge regarding implementing a loop within this component to display a list of all users. Despite trying numerous approaches, I haven't been able to figure it out. colum ...

Error: Appwrite Login Authentication failed due to account.createEmailSession function not recognized as a valid function

Looking for help with Vue and Appwrite? Check out this tutorial: https://appwrite.io/docs/tutorials/vue/step-1 src/appwrite/index.js import { Client, Databases, Account } from "appwrite"; const client = new Client(); client .setEndpoint(" ...

Unusual sequence of JQuery Ajax calls

Within my website, there is a project div that is displayed using EJS. The data for the projects in EJS are rendered using a forEach loop, resulting in multiple similar divs appearing on the page. Each project div is assigned an id for identification pur ...

Tips for creating a Calculator with AngularJS

I am encountering issues while trying to develop a calculator using AngularJS. Below is the HTML code I have written: <!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-com ...

Implementing a feature to dynamically add multiple markers on Google Maps

Currently, I am utilizing the .text() method to extract latng from the html. <div class="latlng"> -33.91722, 151.23064</div> <div class="latlng"> -32.81620, 151.11313</div> As a result, I am using $(latlng).text() to retrieve the ...

What is the best way to input two distinct variables into the Firebase database?

I have encountered an issue while trying to upload two variables into my Firebase database. Only the first variable, newRoute, is being successfully uploaded while new User isn't getting uploaded. The setup of the Fire configuration for the entire web ...