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 8585911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:10:57+00:00 2026-06-11T22:10:57+00:00

so i have a simple unordered list: <ul id=nav> <li> <span>Group 1 »</span> <ul>

  • 0

so i have a simple unordered list:

<ul id="nav">
<li>
    <span>Group 1 »</span>
    <ul>
        <!-- list items -->
    </ul>
</li>
<li>
    <span>Group 2 »</span>
    <ul>
        <!-- list items -->
    </ul>
</li>
</ul>

I have styled this menu and added some jQuery to show 2nd level ul‘s whenever user clicks on the span area and span‘s are styled to be block-level, so you can click everywhere inside the list items and have the expected functionality.

The problem is, after user clicks on span element and the unordered list appears, the span acts like an inline element, and to disappear the ul user has to click on the text and clicking on parent-li area won’t work.

you can see the live demo here: http://jsfiddle.net/d2Z7m/6/

maybe there’s better solutions to create a vertical menu, but i just want to figure out why span element is acting like this and what causes this.

  • 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-11T22:10:58+00:00Added an answer on June 11, 2026 at 10:10 pm

    Change your styling for #nav li ul to

    #nav li ul {
        width:100px;
        margin: -35px 0px 0px 155px;
    }
    

    As currently the padding is affecting the span tag.

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

Sidebar

Related Questions

I have a simple unordered list with list items as menu item i created
I have a multi-level nav styled as an unordered list that looks like this:
I have a simple unordered list that I want to show and hide on
I have got an simple html unordered list. <ul> <li>Item 1</li> <li> Group 1
I have an unordered list (each list element contains some further markup but this
I have simple unordered list menu. Code is below or you can grab it
I have a simple unordered list with 16 list items. I want to add
I have a simple ASP.Net form with the following unordered list: <ul id=ctl00_ContentPlaceHolder1_BulletedList1> <li>No
http://clifgriffin.com/blockade2/ Ok, I have an unordered list that serves as a list of menu
I have an unordered list like so: <ul class=foo> <li id=asdf> <span class=indexnumber></span> <span

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.