Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9178797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:38:15+00:00 2026-06-17T17:38:15+00:00

I have a menu nav function in css3 and html <nav> <ul> <li><a href=#

  • 0

I have a menu nav function in css3 and html

<nav>
<ul>
<li><a href="#" >Sec1</a></li>
    <li><a href="#" >Sec2</a></li>
    <li><a href="#" class="current">Sec3</a>
    <ul class="menu">
        <li><a href="#" class="documents">Documents</a></li>
        <li><a href="#" class="messages">Messages</a></li>
        <li><a href="#" class="signout">Sign Out</a></li>
    </ul></li>
<li><a href="#" >Sec4</a></li>

</ul>
</nav>

but How can the submenu be like:

enter image description here

instead of:

enter image description here

–Fiddle-
here is fiddle

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:38:17+00:00Added an answer on June 17, 2026 at 5:38 pm

    I understand what you are looking for and have made my jsfiddle as close as possible to yours. Instead of using the images you provided, I used icon fonts, which are useful if you plan on using many images. I got my icon font from Keyamoon at icomoon.io. It’s a really good tool to have and you should definitely use it for any other icons you need. I picked mine from Icon Minia by Egemen Kapusuz. You can see the icons I used and if those are the only ones you need just download the files from the @font-face urls in the jsfiddle, or from here:

    @font-face {
        font-family: 'IHK';
        src:url('http://ilanshomekitchen.x10.mx/icon font testing/IHK.eot');
        src:url('http://ilanshomekitchen.x10.mx/icon font testing/IHK.eot?#iefix') format('embedded-opentype'),
            url('http://ilanshomekitchen.x10.mx/icon font testing/IHK.svg#IHK') format('svg'),
            url('http://ilanshomekitchen.x10.mx/icon font testing/IHK.woff') format('woff'),
            url('http://ilanshomekitchen.x10.mx/icon font testing/IHK.ttf') format('truetype');
        font-weight: normal;
        font-style: normal;
    }
    

    You can just copy the links from here and it will give you the font file to download if you only need these 3 icons. Icon fonts are great because instead of loading 1 image for each background or icon or whatever, you can package the icon fonts all together into 1 HTTP request, making them more efficient in the transfer, and also more customizable. Icon fonts are just a font, so you can also manipulate them much more easily; you can change the color of the font, the anti-aliasing, just like a real text font.

    I rewrote your code with some jQuery because yours seemed very jumbled and a little hard to understand, so if you would like to use my exact jsfiddle, you will need to add a jquery source link either from a CDN or host your own copy on your server. jquery.com will have tons of info about that.

    So for my HTML:

    HTML:

    <nav>
        <ul>
            <li><a href="#" >Sec1</a></li>
            <li><a href="#" >Sec2</a></li>
            <li><a href="#" class="current">Sec3</a></li>
            <li><a href="contacto.html" >Sec4</a></li>
            <ul class="menu">
                <li><a href="#" class="documents" data-icon="&#xe000">Documents</a></li>
                <br>
                <li><a href="#" class="messages" data-icon="&#xe001">Messages</a></li>
                <br>
                <li><a href="#" class="signout" data-icon="&#xe002">Sign Out</a></li>
            </ul>
        </ul>
    </nav>
    

    The html has some new attributes, which I titled data-icon. I used these to incorporate the icons from the icon font without adding an official element in the DOM. Browser support for this is a little new, so you should look into a redundant icon scheme just in case users are using an old browser that doesn’t support icon fonts and the other new features that you also had like border-radius and transitions.

    The CSS was modified a lot to use psuedo selectors, which are very useful. Additionally, I now have the nav bar working from jQuery, so it should be supported well because jQuery is a cross-browser JavaScript libary.

    The only thing I couldn’t fix was this little problem where the hovered text in the 2nd navigation level would jump, I don’t know why that happens, I will look into it, but for now, this is what I was able to produce for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a menu set up this way: <div id='top-navigation'> <ul> <li><a class='top-nav-button-unclicked' href='#'>SUBJECT</a></li>
I have a simple nav menu: <ul> <li><a href=index.php id=home_menu>Home</a></li> <li><a href=purchase.php class=selected id=information_menu>Information</a></li>
I have this navigation menu: <nav id=hoofd_menu> <a href=portfolio/ title=Portfolio target=_self class=fade portfolio>Portfolio</a> <a
I have a menu with some links. Like this: <ul id=nav><li><a href=# class=tartalom>Some Div
I have this nav menu with 2 tabs: <div id=user_menu> <ul class=nav nav-tabs> <li
I have this jquery code. //this is the main javascript $(document).ready(function(){ $('nav.menu a').hover( function
I have menu generated by a CMS with HTML output like: <ul id=category-nav> <li>
So I have a simple jquery code to highlight the nav menu. $(document).ready(function(){ $('#header
I have the following code: $(document).ready(function() { $('#nav li').hover( function() { // Show the
I am using the get_categories() function to manually create myself a nav menu. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.