Could we potentially implement a dropdown menu that spans the full width of the screen while still being contained within a wrapper set to a width of 1024

I have a query - can I create a full-width dropdown menu within a wrapper that has a width of 1024px (with contents centered on the screen)? My dropdown menu is causing some issues. Although the hover effect is not functioning yet, I am still working on styling the dropdown menu.

Below is the code snippet:

#lower-header {
  background-color: #ffffff;
  height: 100px;
  position: relative;
  width: -webkit-fill-available;
  z-index: 1;
  img {
    float: left;
    margin-top: 33px;
  }
  ul {
    list-style: none;
    display: block;
    float: left;
    margin: 17px 0px;
    padding-left: 30px;
    li {
      display: inline-block;
      font-size: 17px;
      font-weight: bold;
      padding: 16px 19px;
      height: 73px;
      .sub-menu-whole {
        background-color: #ffffff;
        height: 360px;
        z-index: 1;
        margin-top: 44px;
        &:after {
          content: "";
          display: table;
          clear: both;
        }
        div {
          position: absolute;
          margin: -33px 0;
          padding: 0;
          div {
            float: right;
          }
        }
      }
      a {
        text-decoration: none;
        color: #000000;
        &:hover {
          color: red;
        }
      }
    }
  }
}
<div id="lower-header">
  <div class="wrapper">
    <img src="images/logo/logo_01.png">
    <ul>
      <li>
        <a href="#">KU Startup</a>
        <div class="sub-menu-whole">
          <div>
            <img src="images/bg/bg_sub_01.png">
          </div>
          <div class="column">
            <ul>
              <li>
                <a>Introduction</a>
              </li>
              <li>
                <a>Startup Department Overview</a>
              </li>
            </ul>
          </div>
        </div>
      </li>
      <li><a href="#">Program</a></li>
      <li><a href="#">Startup Leader</a></li>
      <li><a href="#">Startup Incubation</a></li>
      <li><a href="#">Startup Mentors</a></li>
      <li><a href="#">Community</a></li>
    </ul>
  </div>
</div>

Answer №1

Try deleting the float: left; declaration in the ul style and include width:100% instead.

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

Instructions on transforming a XAML grid in WPF into a JSON array

Currently, I am utilizing a XAML WPF grid in my project and I am looking to transform the structure of the grid into JSON format. Do you have any suggestions or ideas on how this can be achieved? For reference, here is an example: <GridBinding> ...

jQuery struggles to process large response

I am currently developing an application that sends requests to a URL and parses the table found in the HTML response using jQuery. While this method works well for smaller amounts of HTML code, it runs into issues with larger datasets. The problem arises ...

I have always wondered about the meaning of " + i + " in Javascript. Can you explain it to

<script> var x,xmlhttp,xmlDoc xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "cd_catalog.xml", false); xmlhttp.send(); xmlDoc = xmlhttp.responseXML; x = xmlDoc.getElementsByTagName("CD"); table="<tr><th>Artist</th><th>Ti ...

Having trouble making SCSS mixins work with CSS variables in NextJS?

My current next.config.js setup looks like this: module.exports = (phase, {defaultConfig}) => { if ('sassOptions' in defaultConfig) { defaultConfig['sassOptions'] = { includePaths: ['./styles'], ...

Smooth scrolling feature for Wordpress websites

I am currently in the process of converting an HTML5 template into a Wordpress theme. One specific feature I'd like to add is a custom scroll for Wordpress using the code: <script src="jquery.nicescroll.js"></script> DEPENDENCIES This cod ...

Safari is not properly handling element IDs when used in conjunction with React

I am currently in the process of building a straightforward single-page website utilizing React. At the top of the page, there is a navigation bar that contains links to various sections of the site: <li><a href="/#about">About u ...

Active Arrow Link

I'm currently working on customizing the appearance of my WordPress site's categories sidebar by adding an arrow to the left side of the active link. After tweaking the CSS to achieve the desired behavior and making some color adjustments for te ...

Adjust the spacing between the inputRoot and input in Material UI Autocomplete

Recently, in one of my projects, I've been utilizing Material-UI's Autocomplete component. Despite its lack of flexibility with resizing, I managed to tweak certain width, height, and font size attributes successfully. However, I'm currently ...

How can I verify if an SVG file has a reliable source? (having troubles converting SVG to canvas)

While attempting to use an SVG generated by a chart plugin (https://wordpress.org/plugins/visualizer/), I am facing issues retrieving the source of the SVG-image being created. Interestingly, when using other SVGs with the same code, everything works perfe ...

Display <div> exclusively when in @media print mode or when the user presses Ctrl+P

Looking for a way to create an HTML division using the div element that is only visible when the print function is used (Ctrl+P) and not visible in the regular page view. Unfortunately, I attempted the following method without success. Any advice or solut ...

Displaying live data from an XMLHttpRequest in a Vue component in real-time

I'm currently working on implementing lazy loading for a list of posts fetched from the WordPress REST API. My goal is to load additional news stories upon clicking an HTML element. However, I'm facing issues with accessing the original Vue inst ...

Ways to connect to a minimized hidden tabindex component using the hashtag symbol

I have created a glossary with terms in columns and hidden texts using plain css/html. Each entry is structured like this: A term followed by a hidden explanation, revealed on focus without the use of Java or JS. Instead of using :hover, I utilize :focus ...

A sleek and streamlined scrollspy that dynamically updates the active class exclusively for anchor tags

Can anyone help me with this coding problem? I'm currently working on a minimalistic scrollspy code that adds an active class when the content is offset.top. The code works fine, but I want to change the active class to apply to the "a" tag instead of ...

Confirmation for deletion in HTML form

Is there a way I can include a confirmation message for deleting an item on my form button? Any suggestions on which JavaScript code to use? <script type="text/javascript"> function confirmDelete() { return confirm("Are you sure you want to delete ...

Parallax Effect in CSS Background

I am currently working on my website at and have implemented a "parallax-bg" class to create a parallax background effect. Interestingly, the parallax effect is working flawlessly for the hero section at the top and the texture in the middle, but it&apos ...

Connecting a hero image in CSS for Flask application: a step-by-step guide

Adding a hero image to my Flask app page has been challenging. Here is the directory structure of my Flask project: -static |--css_files |--my.css |--images |--img.jpg -templates |--layout.html In order to incorporate a hero image, I have includ ...

Using the transform property with the scale function causes elements positioned in the bottom right corner to vanish

Issue specific to Google Chrome and Windows 10 I'm currently working on a flipbook that adjusts content size using transform:scale() based on the user's screen size. There is also a zoom feature that allows users to adjust the scale factor. I ha ...

Utilize text alignment effectively by considering language direction - left-to-right for English and right-to-left for Arabic

I am managing a community website and I am looking to customize the text direction based on the language of the posts. For English posts, I want the direction to be LTR with text-align: left) For Arabic posts, I want the direction to be RTL with text-ali ...

Is it possible to pass a random variable into an included template in Jade?

In my jade template called 'main page', I have a reusable template named 'product template'. The 'product template' is designed to display dynamic data and needs to be flexible enough to be used in multiple pages without being ...

Creating a hover effect in CSS that applies to neighboring elements with similar attributes

My table is created using a struts2 iterator and has variable length and content. It looks something like this: <table> <tr class="odd" machineId="1" parameterId="1"><td></td></tr> <tr class="even" machineId="1" pa ...