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

Is there a different method like Calc() to create a static sidebar alongside content?

Is there a way to achieve a fixed sidebar on the left and a content area on the right without using calc() in CSS? I'm looking for a more universally supported method that works across different browsers. .left-sidebar { width: 160px; ...

Adding style using CSS to a dynamically generated table row in Vue.js

Currently, I am working with a table that dynamically generates rows using v-for: <table> <tr><th class='name'>Name</th><th>Surname</th></tr> <tr v-for='data in datas'><td class=&a ...

Personalized cursor image using jQuery.css()

I have designed a .png image that I want to use as a custom cursor for a particular element with the class "next". Here is the code I am using, but it doesn't seem to be working. Is there anything important that I may have overlooked? $('.next& ...

A tool that enhances the visibility and readability of web languages such as HTML, PHP, and CSS

Looking to organize my own code examples, I need a way to display my code with syntax highlighting. Similar to how Symfony framework showcases it on their website: http://prntscr.com/bqrmzk. I'm wondering if there is a JavaScript framework that can a ...

How can I prevent an endless loop in jQuery?

Look at the code snippet below: function myFunction(z){ if(z == 1){ $(".cloud").each(function(index, element) { if(!$(this).attr('id')){ $(this).css("left", -20+'%'); $(this).next('a').css ...

Creating a distinctive appearance for JavaScript's default dialogue box

Is there a way to enhance the design of my code that prompts the user for input using JavaScript's `prompt`? Currently, it appears too simplistic. Are there any CSS or alternative methods to improve its appearance? function textPrompt(){ var text = ...

Creating HTML code that is optimized for mobile devices

My front end design is based on the CSS stylesheet from W3Schools.com, which includes a class property called "w3-rightbar" for adding a thick right border. However, I encountered an issue where I needed to hide this "w3-rightbar" specifically on mobile vi ...

Show two choices in a select box next to each other

I've been attempting to display a select box with two options side by side in a list format. Struggling to find any libraries that can achieve this functionality. Here is an example: <select> <option x><option y> <optio ...

What is the best way to ensure a footer always remains at the bottom of the page with Telerik controls?

I'm currently working on an asp.net MVC project that utilizes the latest version of Telerik controls. The layout consists of a shared view with a header at the top, a left-side menu, and a footer at the bottom. In the main section, I use a @RenderBody ...

Craft a stunning transparent border effect using CSS

I am trying to achieve a unique border effect for an element using CSS, where the transparency is maintained against the background: This is the desired outcome: https://i.stack.imgur.com/6Z1MU.png However, the border I am currently able to create looks ...

Creative CSS spinners design

Seeking assistance to modify my spinner design. I want one end to be thicker and the other end to be thin. My attempts so far have been unsuccessful. <div id="data-loader"> <div class="loader"> <div class="blue"></div& ...

"I can't figure out why my footer keeps showing up at the top of the page unexpectedly

Currently, my footer is showing up at the top of the page but I really want it to be at the bottom. I'm new to HTML so apologies if this is a simple fix. Here is my file with internal CSS: .middle { position: fixed; top: 50%; left: 50%; tr ...

Is there a way to switch up the dropdown chevron using only CSS after a click?

Is there a way to change the appearance of dropdown arrows using only CSS and animations when clicked on? I attempted the following method: body { background: #000; } #sec_opt select { /* Reset */ -webkit-appearance: none; -moz-appearance: n ...

Adjusting the color of a value in justGage requires a few simple steps to

Is it possible to modify the color and design of the text in the Value parameter of justGage after creating the gauge? My goal is to change the text color to blue with an underline to give it a link-like appearance. Appreciate your assistance. ...

Unused DIV elements in jQueryUI are identified using XSLT

Just a heads-up, I'm new to xslt so please bear with me if this seems like a silly question. In my xsl:template I have created a div element like this: <div id="objectLocked"> This object is locked by another user. Do you want to remove the lo ...

Masking of the Navigation Button

I designed a responsive navigation bar, but in mobile view, the menu icon is being hidden by the menu headings when displayed. Check out the scenario below with a provided CodePen link. I attempted to adjust padding and float properties without success. An ...

What is the best way to add a color swatch image using Javascript?

I'm facing a challenge in Shopify where I need to assign corresponding background images to color swatches. Currently, my icons are set up with the correct links for each color, but they are missing their respective images, similar to this example. I ...

Aligning the navigation links vertically

I am working on aligning my navigation bar vertically, even when I scroll the page. I found a method in another thread which suggests using the following CSS code for vertical alignment: #container { position: absolute; top: 50%; height: 400p ...

Tips for dynamically hiding/showing a button depending on the focus of two different HTML inputs

I'm working on a login section and looking to add a unique feature: When a user selects the email or password input field, I want the button text to change to 'LOGIN'. If neither input field is selected, the text should display 'NOT A ...

Photo attached at the bottom of each container

Here is the link to my code snippet: fiddle. I am struggling with aligning shopping bag icons at the bottom of each box on my webpage. I want all boxes to have the same height, so I used display: table-cell; in the box_left div. However, placing the shopp ...