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

Show a message on form submission rather than redirecting

I'm working on a simple sign-up form and I want to show a success message directly on the page instead of redirecting to another page after submission. Is it better to display the message as a pop-up, an alert, or just on the page itself? <form a ...

Refresh the cumulative URL count in JavaScript following the completion of an AJAX submission

My shopping cart is filled with URLs that include a total key: The total value in the cart is <span id="cart-status" >1805.32</span> <ul> <li><a href='/Store/Category/Products?user=ADMIN&total=1805.32'& ...

The <a> tag does not have the clickability feature

My personal website doesn't allow me to click on the links that I have added for web pages. Here is the CSS code I am using: @font-face { font-family: typewrite; src: url(fonts/typewcond_regular.otf); } @font-face { font-family: typewrite; sr ...

What are the benefits of utilizing the useStyles MaterialUI function instead of traditional CSS?

As I develop my MERN application, I am utilizing Material UI components along with inline attributes. However, I find myself questioning the necessity of creating a JavaScript file just to import the makeStyles function, which essentially outputs an obje ...

Height of list items in image gallery does not automatically readjust

I'm facing an issue regarding the height of an li element. Check out this CodePen link for reference. <div class="row fp-gallery"> <ul class="large-block-grid-4 medium-block-grid-4 small-block-grid-2"> <li> <a href= ...

Using AngularJS and JavaScript, set the Submit button to be enabled only when the email input is valid and a value is selected in

I'm trying to create a form that includes an email input field and a drop-down list sourced from a database array. Initially, the submit button is disabled when the form loads. My goal is to figure out how to activate the submit button only when the ...

Unable to retrieve information from the JSON object

Here's the script I'm working with: <script type="text/javascript> function getData(username){ $.ajax({ url: '{% url "data" %}', data: { ' ...

Encountering the "Invalid Element Type" error in a Vue Native project right after setting it up

After creating a vue-native project with the command vue-native init henry-pager, I navigated to the directory and initiated the online builder by running expo start. However, when attempting to run it on the web platform, an error message appeared: Error: ...

What is the process for displaying user input on the console?

How can I ensure that the server is receiving user input? What steps should I take to print this input to the console? Currently, the console.log statement only displays "About to create new room", but I require the user input as well. Client-Side: // C ...

The clash between React Inline styles and Client CSS can lead to conflicts in styling

Our application needs to be loaded into the client's page, which is built using React. We are implementing React Inline Styles by defining styles as objects. However, we have encountered an issue where any CSS specified by the client using tag attribu ...

Utilizing jQuery or JavaScript to transfer information within a Bootstrap modal

I am working with a table that is generated from an SQL Table using PHP for data looping. HTML <tbody> <?php $no = 1; foreach($data_request as $data) { ?> <tr> <td class="center"><?php echo $no++.". ";?> ...

What is the best way to showcase a photo selected using an HTML input within a div container?

My goal is to select a photo from a folder and display it on a webpage, but I have struggled to find a working solution. Can this be achieved using just basic HTML, CSS, and JS? I am new to web development, so please forgive me for any beginner questions. ...

Session Redirect Error in Express.js

Encountering an error consistently when running my code with the pseudocode provided below (Just to clarify, my code is built on the react-redux-universal-hot-example) Error: Can't set headers after they are sent. [2] at ServerResponse.OutgoingMe ...

Having trouble resolving the module path 'fs/promises' while using Next.js and eslint

Recently, I began working on a Next.js application and successfully configured eslint to ensure code quality. Here is the list of dev dependencies for my Next.js app: "devDependencies": { "babel-eslint": "^10.1.0", &qu ...

What is the process for inserting a hyperlink onto an image within a query slider?

I am experiencing difficulties when attempting to add hyperlinks to the images in my slider. I have come to understand that images cannot be clickable in jQuery sliders, so I have tried the following in the HTML: <div class="wrapper"> <div class= ...

Adapting button properties in Material UI according to screen breakpoints

Is there a way to adjust the variant and size of a material-ui button based on different screen sizes? I want to use no variant or size="small" below a certain breakpoint, and then switch to variant="outlined" and/or size="large" above that breakpoint. Ty ...

The routing functionality in Angular4 encounters issues when the `router.navigate()` method is used within the callback of a

I am currently working on implementing Google Sign In within my Angular4 app, but I have run into an unusual issue with routing after using router.navigate() in the Google Sign In callback function. To help illustrate this issue, I have created a sample d ...

Is there a way for me to make this Select update when onChange occurs?

I am facing an issue with a react-select input that is supposed to display country options from a JSON file and submit the selected value. Currently, when a selection is made, the field does not populate with the selection visually, but it still sends the ...

Changing the format of PHP SQL results from vertical to horizontal

Is there a way to convert the vertical table generated by the following code into a horizontal one with stylish formatting? Additionally, is it possible to display certain columns in a popup window based on query parameters using jQuery or CSS? <html&g ...

Tips for converting the Instagram cURL post request to a JavaScript request

I am attempting to convert the code I received from Instagram into a token. The code provided in the Instagram DOCS uses a curl request, but I would like to implement it using JavaScript instead. Here is how the original code looks: curl -X POST &bsol ...