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

  • Home
  • SEARCH
  • 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 7058707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:08:41+00:00 2026-05-28T04:08:41+00:00

I found this amazing resource http://gtmetrix.com/ that you supply a URL to a website

  • 0

I found this amazing resource http://gtmetrix.com/ that you supply a URL to a website and it gives you a performance report and gives you estimates on what you can save by compressing and optimizing different things.

It even does most of it for you, it optimized all my images, css, and javascript files, showed me css that is not being used on the current page, it also shows a list of non-efficient CSS selectors and shows the selector and the line number it is on in your css file.

Here is one of the results for me that I use for a navigation menu

ul#menu-navigation li>ul li a Tag key with 3 descendant selectors and ID overly qualified with tag
ul#menu-navigation li>ul li a:hover Tag key with 3 descendant selectors and ID overly qualified with tag

So my question is, is there a better way to do a UL list menu that has sub-menus items?

  • 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-05-28T04:08:42+00:00Added an answer on May 28, 2026 at 4:08 am

    First, you don’t need the ul before the ID, because the ID is unique enough, but it’s arguable for readability for you, etc..

    Of course also you can remove the >ul, but I assume you added it consciously to be specific, and in CSS, it’s “safer” (while “better” is arguable) to be more specific than generic.

    Then, assuming you don’t change your markup (with extra class or so), I think this is the right way. There is redundancy and such I completely agree. This is an inherited problem in CSS. You can’t solve it with CSS itself. You live with it, or you look for something that doesn’t have the problem to generate CSS for you.

    In my current project, I’m using LESS CSS, this is a syntax very similar to CSS, and generates actual CSS files via a command prompt (or a Visual Studio extension called, well, LessExtension, which generates on save). There is also JS file for generation in the browser.

    Check it out. I bet you’ll like it. You can take your CSS file as is, and start adding benefits.

    http://lesscss.org

    You selectors in LESS would be:

    #menu-navigation {
        li>ul li a {
            /* some Anchor styles */
    
            &:hover {
                /* some Anchor hover styles */
            }
        }
    }
    

    Of course you can also have middle nesting levels as well. Here I did all li>ul li a one selector instead of multiple nesting levels for simplicity, but normally I’d make each of them a nesting level.

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

Sidebar

Related Questions

I found an amazing typewriting effect at this website: http://www.9elements.com The header shows a
I have found this amazing control that does exactly what I need, only problem,
Found this official ACS demo http://www.fabrikamshipping.com/ while researching on ACS. In the app itself,
Found this one http://www.kite9.com/content/adl-new-visual-language-part-2 (presentation here http://www.kite9.com/content/muddle-uml ) not cheap :( Any others that
I found a vector library on the Internet that even works with IE6! http://raphaeljs.com/index.html
found this runtime INotifyPropertyChanged generator http://www.codeproject.com/Articles/141732/Automatic-Implementation-of-INotifyPropertyChanged wondering if there is a static generator to
found this little code snippet that seems to do what i want, but im
Found this question that explained a way to communicate between layers. However there is
I found this code on the internetz, it checks the current page url; function
Found this post that helped me out: Split a string to form multidimensional array

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.