A slew of problems arises from this horizontal list

Honestly, I've been struggling with this problem for hours - the submenu just won't style properly, and no matter how many lists I compare it to, I can't seem to get it right.

The website: - you have to click "enter" to see the list, my apologies for that.

The issue: The sub-list under the "corporate" category - I want the hovered item to fill the entire width of the sub- UL. Currently, the black only fills about 80% of the ul's width.

The code snippet I am utilizing:

<div id="navigation-menu-container">
   <ul>
      <li><a href="<?php echo home_url(); ?>" id="nav-home" class="noSlide <?php if (is_home() || is_front_page()) { echo "curr-page-nav"; }?>"><span class="nav-hidden">HOME</span></a></li>
      <li><a href="<?php echo get_page_link(838); ?>" id="nav-about" class="noSlide <?php if (is_page(838)) { echo "curr-page-nav";}?>"><span class="nav-hidden">ABOUT</span></a></li>
      <li><a href="<?php echo get_page_link(1033); ?>" id="nav-wedding" class="noSlide <?php if (is_page(1033)) { echo "curr-page-nav";}?>"><span class="nav-hidden">WEDDINGS</span></a></li>
      <li><a href="<?php echo get_page_link(1303); ?>" id="nav-mitzvah" class="noSlide <?php if (is_page(1303)) { echo "curr-page-nav";}?>"><span class="nav-hidden">MITZVAHS</span></a></li>
      <li><a href="<?php echo get_page_link(1530); ?>" id="nav-celebration" class="noSlide <?php if (is_page(1530)) { echo "curr-page-nav";}?>"><span class="nav-hidden">CELEBRATIONS</span></a></li>
      <li><a id="nav-corporate" class="accordionButton <?php if (is_page(1635) || is_page(1909)) { echo "curr-page-nav";}?>"><span class="nav-hidden">CORPORATE</span></a>
          <ul>
              <li><a href="<?php echo get_page_link(1635); ?>" id="nav-meeting" class="subitem"><span class="nav-hidden">MEETINGS</span></a></li>
              <li><a href="<?php echo get_page_link(1909); ?>" id="nav-event" class="subitem"><span class="nav-hidden">EVENTS</span></a></li>
          </ul>
      </li>
      <li><a href="<?php echo get_page_link(831); ?>" id="nav-testimonial" class="noSlide <?php if (is_page(831)) { echo "curr-page-nav";}?>"><span class="nav-hidden">TESTIMONIALS</span></a></li>
      <li><a href="<?php echo get_page_link(874); ?>" id="nav-associate" class="noSlide <?php if (is_page(874)) { echo "curr-page-nav";}?>"><span class="nav-hidden">ASSOCIATES</span></a></li>
</ul>
</div>

I've reviewed my styles multiple times but still can't figure out how to make the necessary changes.

If you're curious, here's a screenshot showing what the source code looks like on my end.

Answer №1

My recommendation would be to utilize a <ul> and <li> structure instead of your current setup.

Consider this approach: http://jsfiddle.net/Nafhr/

Answer №2

Could you please provide a screenshot demonstrating the expected behavior?

In Firefox 3, the sub-menu appears behind the main image instead of in front. You can fix this by adding z-index: 9999; to ensure it is on top of the image. Also, make sure your positioning is set to relative.

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

Using JavaScript, append a hidden input field in Yii2 and retrieve it from the controller

Seeking assistance as a newcomer to yii2. I'm looking for help in resolving an issue that has arisen. I'm attempting to add a hidden input field to my form using JavaScript (not linked to a model). Subsequently, when I submit the form, I want to ...

Click once to expand all rows in the table with ease

I have successfully created a basic table using HTML. The table includes nested elements that are designed to open individually when clicked on the assigned toggle. Essentially, clicking on a '+' icon should reveal a sub-menu, and clicking on a & ...

ng-deep is causing changes in sibling components

Facing a challenge with Angular Material Design as I discovered the need to utilize ng-deep to customize the styling of an accordion. The issue is that when I use this method, it affects another accordion in a different section which is undesirable. Is th ...

Stylized search input inspired by Pinterest with a bubbly design

When it comes to my search bar, I want the user's entered keywords to be displayed within a bubble that has a delete option when they press space to add another keyword. This functionality is similar to what Pinterest does with their search bar, as de ...

What is the best way to send user input text to a Vue method using v-on:change?

I am trying to pass the input value from my HTML to a Vue method called checkExist(). I need to get this value within the checkExist() method. Can anyone provide advice on how I can achieve this? I am new to Vue and could use some guidance. HTML: <inp ...

I find myself unable to write any code using my Visual Studio Code

I'm facing an issue where I can't write any code on my Visual Studio Code. Despite following all the recommendations on the official website, I haven't been able to resolve the problem. More information here Here are the changes I have tri ...

Display a helpful tooltip when hovering over elements with the use of d3-tip.js

Is it possible to display a tooltip when hovering over existing SVG elements? In this example, the elements are created during data binding. However, in my case, the circles already exist in the DOM and I need to select them right after selectedElms.enter ...

Conceal a division using CSS based on its data-role attribute

After extensive research, I have yet to find a solution. Let's say there is a div structured like this: div[data-role="form-footer"] What would be the most effective method for hiding it, and can it be done using CSS? I've tried the f ...

Is it possible to position images in a circular layout around a central

I am struggling to position small planetary images around the main logo in a way that creates a satellite-like effect. Despite my efforts with positioning and margins, I have not been successful in achieving the desired look. Additionally, when I insert th ...

Filling HTML5 Datepicker Using Information from a Model

Currently, I am in the process of developing a basic scheduling application for a project. To simplify the task of selecting start and end times/dates for our events, we have included a simple DateTime picker in the source code: <input type="datetime-l ...

"Troubleshooting issue with PHP code not running in a specific project within XAM

For some reason, the PHP codes are not parsing correctly and are just displaying as they are on the page. I am using xampp for this project, and all other projects on the same server are working fine. I have made sure not to use short tags like <?. I ...

The TailwindCSS breakpoints are not being recognized in the styling

I am currently working on a NextJS 14 project where I am integrating Tailwind CSS. Here is a snippet of the code I am using: <div className="text-amber-dim md:text-amber flex-1 h-screen flex items-center justify-center"> <div classNam ...

Achieving the ideal 3-column design

I'm currently struggling to achieve a proper 3 column layout with my HTML and CSS code. Here's what I have: <div class="row"> <div class="col">C1</div> <div class="col">C2</div> <div class="col">C3 ...

Is Jquery not tallying up the numbers accurately?

Looking to secure a ticket with a complimentary offer? Here are the guidelines: A single individual can purchase 1 or more tickets, but the maximum is 4 An offer of at least 1 euro can be made for tickets, with no upper limit. For instance, if 4 tickets ...

The form submission feature is malfunctioning due to JavaScript issues

I have forms that allow file uploads (images), and I am trying to restrict the size of those images to 500KB. However, for some reason, the forms are not submitting and I am unsure why. Below is the jQuery code: $('form').on('submit', ...

Seeking guidance on creating an uncomplicated CSS tooltip

Can anyone help me troubleshoot why my CSS tooltip isn't working correctly? I've been trying to create a simple method for tooltips, but they are displaying inconsistently across different browsers. In Firefox, the tooltips appear in random locat ...

I am trying to figure out how to style each box individually, but I'm running into some confusion. There are three different classes to choose from, with the child class

Struggling to style the ten boxes individually? Renaming each class of the box child didn't work as expected? Wondering how to select and style each box with a unique background color? Also facing issues with displaying the logo image on the navigatio ...

A blank screen of errors pops up when attempting to update through a form

Encountering a white error screen when attempting to add an item using a form in Python / Django. I'm currently debugging the issue but lacking information. Any guidance on where to look next would be greatly appreciated.https://i.sstatic.net/daavn.pn ...

What could be causing my Mocha reporter to duplicate test reports?

I've created a custom reporter called doc-output.js based on the doc reporter. /** * Module dependencies. */ var Base = require('./base') , utils = require('../utils'); /** * Expose `Doc`. */ exports = module.exports = ...

Display the navigation controls in the CSS Bootstrap Carousel only when hovering over the control section, rather than when hovering over the entire carousel

My carousel displays full page images, but I want the controllers to only appear when the mouse hovers over the specific area they are in, rather than appearing when the mouse is anywhere on the page. .carousel .carousel-control { visibility: hidden; ...