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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:17:56+00:00 2026-05-11T09:17:56+00:00

I would like to build a tree like navigation interface in pure markup (that

  • 0

I would like to build a tree like navigation interface in pure markup (that is, without needing javascript/jquery etc.).

Unordered lists <ul> seem like the best solution, and I have found this tutorial on simplebits.com is very close to the solution I need. However, the author defines the stylesheet with the assumption that the final/max depth of any branch is already known:

#sitemap li ul li ul li {     padding-left: 16px;     background: url(bullet.gif) no-repeat 0 50%; }   

I want to know if there is way to allow the markup to descend ‘infinitely’ and have the styling support this seamlessly.

If you need more clarification on this, please just let me know.

  • 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. 2026-05-11T09:17:56+00:00Added an answer on May 11, 2026 at 9:17 am

    There are tutorials on this but there are two problems:

    1. IE6 doesn’t support :hover on tags other than anchors so you need a Javascript solution for that browser; and
    2. It’s actually really complicated to get it working consistently across the major browsers.

    Consider the alternative using jQuery and the superfish (inspired by suckefish) plug-in:

    <ul class='menu'>   <li>... </ul> <script type='text/javascript'> $(function() {   $('ul.menu').superfish(); }); </script> 

    Done.

    If you do go the (semi-)pure CSS route, I highly recommend you use one of the existing frameworks for this (like suckerfish or a derivative). Otherwise you’ll just be pulling your hair out and spending a lot of time to get it to work right.

    To answer your question about depth: that rule you mentioned essentially is going to infinite depth. Remember a space in CSS is a descendant selector not a child selector. The reason for the repeated groups is so that the rule only applies from (say) the third level down.

    That’s because the first and second levels will have special stylings. The first will be a horitzontal or vertical bar. The second will popout from that but from the third level down it will consistently popout in the same way.

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

Sidebar

Ask A Question

Stats

  • Questions 120k
  • Answers 120k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can get an array of Screens that you have… May 12, 2026 at 12:02 am
  • Editorial Team
    Editorial Team added an answer Turns out Visual Studio requires the Web.config to part of… May 12, 2026 at 12:02 am
  • Editorial Team
    Editorial Team added an answer You could also output the min and max as custom… May 12, 2026 at 12:02 am

Related Questions

How can you access WPF's built-in styles/templates? For example I'm trying to move the
I'm a C Newb I write lots of code in dynamic languages (javascript, python,
I would like to populate a Treeview. Here is what I have in DB
I would like to reflect the XML tree in my object structure, but I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.