Tips for designing a horizontal sub-navigation menu using CSS?

I have limited experience with list menus and am struggling to create a horizontal submenu with its own styling. Despite multiple attempts, I have been unsuccessful in finding a solution and have put the project on hold for now.

Here is what I currently have: www.CAITMIZZI.COM/home.html

The main issue I faced was making the submenu link function without interfering with the main menu. I believe my approach may be incorrect and there could be a simpler solution. Please take a look and provide any feedback you may have.

Thank you!

Below is the CSS code - note that I initially tried to style it using the .sub_menu class but am now using the hoverable class:

#MenuWrapper{
    width: 550px;
    position: absolute;
    left: 30px;
    top: 60px;
    z-index: 9;
    height: 540px;
    cursor:pointer;
    }
#Menu {
    font-family: Impact, Charcoal, sans-serif;
    font-size:125px;
    line-height: 105px;
    height: 540px;
    width: 550px;
    z-index: 8;
    text-decoration: none;
    color: #CCC;
}
#Menu a{
    text-decoration: none;
    color: #9CC;
    }
#Menu ul {margin:0; padding:0;}
#Menu li {
        list-style: none;}
#Menu li a:hover {
    color: #CCFF00;
    text-decoration: none;
    }
.sub_menu{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    color: #903;
    text-decoration: none;
}

a.hoverable {
    position: relative;
    cursor: pointer;
    color: black;
    text-decoration: none;
}

a.hoverable div {
    position: absolute;
    display: none;
    top: 50px;
    left: 425px;
    margin: 0em;
    padding: 1em;
    z-index: 999;
    height: 50px;
    width: 400px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    color: #903;
}

a.hoverable:hover div {
    display: block;
}

Here is an example of the layout:

<div id="MenuWrapper">
        <div id="Menu">
        <ul>
        <li><a href="bio.html">Bio</a></li>
        <li><a href="beauty.html" class="hoverable">Portfolio<div> > beauty | fashion | grooming | advertising</div></a></li>
        <li><a href="bridal.html">Bridal</a></li>
        <li><a href="client_list.html">Client List</a></li>
        <li><a href="contact.html">Contact</a></li>
    </ul>
    </div> 

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

Infinite scrolling with a dynamic background

Hi there, I am working on my website and trying to create a smooth transition between sections similar to the one demonstrated here:. The challenge I'm facing is that the backgrounds of my sections cannot be fixed; they need to have background-attachm ...

Issues with Flex layout in Firefox causing functionality errors

My two text inputs are not cooperating with flex properties as expected. They should be positioned like this: https://i.sstatic.net/ZSumb.png However, they are currently positioning like this: https://i.sstatic.net/e430n.png CSS .container{ width ...

Find and retrieve all data attributes with JavaScript

What is the method to retrieve all data-attributes and store them in an array? <ul data-cars="ford"> <li data-model="mustang"></li> <li data-color="blue"></li> <li data-doors="5"></li> </ul> The resultin ...

Adding an image to a two-column layout with text

Seeking assistance with my website creation using HTML, CSS, and jQuery. Currently, I have a text layout formatted in two columns with an image placed before the text as shown below: <div> <div style="float:right"> <img src="ima ...

The left border consistently occupies any leftover space within the container

I have encountered an issue with my code where the border does not fill the empty space in the div container when there is only one item li present, but works fine if there are multiple items. The problem can be seen in the image below: https://i.sstatic. ...

I'm having trouble getting my modal to open, it just displays the information on my page instead

I am encountering some difficulties with my model window. I would like it to open a modal that shows a larger version of the photo and description when the thumbnail is clicked. However, I have not been able to get it to work properly. The only time it pop ...

Difficulty in aligning Grid elements in Material UI version 5

Strange enough, the MUI5 Grid is displaying unexpected spacing behavior. Instead of providing proper spacing between items and containers, it seems to be causing them to overlap. To see a live example, visit: https://codesandbox.io/s/green-worker-z44vds? ...

Inserting lines into the text, creating a visually appealing layout

Can a notepad design be created using CSS only? Is it feasible to include lines between text lines without using underscores? I want it to look like this example but with minimal spacing between lines and no manual insertion of span tags since the text wi ...

Container for Magazines using HTML and CSS

Looking to develop a digital magazine application with smooth swipe transitions and fade in effects when swiping left and right. I attempted using jQuery.mobile, but struggled with adapting the background image height. My goal is to create a universal web ...

Bootstrap4 allows for a scrollable table body feature

Why am I unable to apply scroll for the table body with a fixed header using Bootstrap-4? I have used min-height and overflow properties to achieve this, but it doesn't seem to work. Does Bootstrap4 not support scrolling on table bodies? The snippet b ...

I am having difficulty retrieving all the cssRules for certain pages

Attempting to retrieve all CSS rules using JavaScript has yielded varying results. For instance, on StackOverflow, the code used is: console.log( document.styleSheets[1].href,'rules', document.styleSheets[1].cssRules,'Should be css rules, ...

What is the reason why the show() function in JQuery only applies to one specific element, rather than all elements selected with the same selector?

JSFiddle. This example code features a nested <table> within another <table>. The main issue concerns the click listener for the #add button. Specifically, the final if/else statement in the function. When you execute this code and click the ...

Guide to aligning 2 divs side by side using bootstrap

I have been experimenting with different methods like col-xs-6 for the first child, but I can't seem to get it right. How can I achieve this layout using only Bootstrap? Despite trying col-xs-6, I still haven't been able to place these divs next ...

In Firefox, the focus outline is not shown on a div that has a mask-image CSS rule applied to

In my code, I have multiple div elements that have the mask-image and -webkit-mask-image CSS rules applied to them. These divs are being used as UI slider components, so I want keyboard users to be able to tab between them and use the arrow keys to adjust ...

When bootstrap buttons are displayed inside a Vue component, there should be no spacing between them

Is this issue specific to the vue-loader or is it more related to webpack builds in general? Consider a basic HTML page with Bootstrap 4 loaded and two buttons added: <button type="button" class="btn btn-primary">Primary</button> <button t ...

Transfer the information of a selected element to a different element

Hello, I am trying to transfer content from a child element to another element. In my HTML setup, there is a hidden div named "DetailsExpanded" and multiple items called "IconWrapper". When an "IconWrapper" is clicked, I want to copy the content of its "I ...

css based on the current time in the United States

I have a working code that currently reads the user's computer time, but I specifically need to get the hours from the USA regardless of the user's location. The CSS should be applied based on USA time. <script type="text/javascript"> dat ...

Display a video modal upon page load, allowing users the option to click a button to reopen the modal

Looking for a way to make a video modal automatically open on page load and allow users to reopen it by clicking a button? Here's a snippet of code that might help you achieve that: HTML <html> <head> <link rel="stylesheet ...

"Enjoy a unique browsing experience with a two-panel layout featuring a fixed right panel that appears after scrolling

I am facing difficulty in designing a layout with two panels where the left panel has relative positioning and the right panel becomes fixed only after a specific scroll point. Additionally, I need the height of the right panel to adjust when the page scro ...

Animating pseudo-elements using Jquery

I'm having trouble animating the :after pseudo-element of my ul. Below is the CSS code I have: #slider .mypagination ul::after { content: ""; width:25%; bottom: 0; left:0; position: absolute; border-top:1px solid #7accc8; ...