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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:04:00+00:00 2026-05-29T07:04:00+00:00

Ref this tutorial: https://www.servage.net/blog/2009/03/20/create-a-cool-css-based-drop-down-menu/ I used an external stylesheet, and simply put #menu before

  • 0

Ref this tutorial: https://www.servage.net/blog/2009/03/20/create-a-cool-css-based-drop-down-menu/

I used an external stylesheet, and simply put #menu before each CSS item, like this:

#menu ul{
font-family: Arial, Verdana;
font-size: 14px;
margin: 0;
padding: 0;
list-style: none;}

or:

#menu ul li{
display: block;
position: relative;
float: left;}

But, when i reference with #menu, the menu doesn’t render properly. It leaves the parent ‘li’ untouched by CSS.

http://jsfiddle.net/UGW2L/

Any ideas?

Thx,
Dave

  • 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-29T07:04:01+00:00Added an answer on May 29, 2026 at 7:04 am

    #menu ul targets this (any ul inside of an element with id='menu')…

    <div id="menu">
        <ul> <!-- <<-- this element is the target -->
           ...
        </ul>
    </div>
    

    (div is just an example, any element with id="menu" can be used above)


    ul#menu targets this (the ul with id='menu')…

    <ul id="menu">  <!-- <<-- this element is the target -->
        ...
    </ul>
    

    Edit as per comments:

    Quote: “…i am missing the ‘box’ around the parent node.”

    I think the node to which you refer is the <li>, just inside the parent <ul id='menu'>, and you have not targeted it anyplace at all.

    Just add ul#menu li a to your box styling. (Note the comma. It separates two totally unique selectors sharing the same styling.)

    ul#menu li a,
    ul#menu ul li a {
      display: block;
      text-decoration: none;
      color: #ffffff;
      border-top: 1px solid #ffffff;
      padding: 5px 15px 5px 15px;
      background: #2C5463;
      margin-left: 1px;
      white-space: nowrap;
    }
    

    http://jsfiddle.net/cWpEg/1/

    See the difference?

    ul#menu is the parent.
    ul#menu li is the first item inside the parent.
    ul#menu li a is the link inside the first child of the parent.

    Since ul#menu li targets any & all <li>‘s that are children of the ul#menu parent, you would only need the one selector…

    ul#menu li a {
      display: block;
      text-decoration: none;
      color: #ffffff;
      border-top: 1px solid #ffffff;
      padding: 5px 15px 5px 15px;
      background: #2C5463;
      margin-left: 1px;
      white-space: nowrap;
    }
    

    http://jsfiddle.net/cWpEg/2/

    Also note how it’s the full width of the screen.

    To target & style just the parent, add something like this.

    ul#menu {
      display: block;
      position: relative;
      float: left;
      list-style: none;
    }
    

    http://jsfiddle.net/cWpEg/6/

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

Sidebar

Related Questions

Just working through a tutorial on asp.net/mvc for the music store application. Ref: http://www.asp.net/mvc/tutorials/mvc-music-store-part-3
I am following this tutorial to setup spring in my system, http://www.roseindia.net/spring/spring-mvc-hello-world.shtml . Here
I followed this tutorial to create a sample Login application using ASP.NET MVC I
I am following this tutorial: http://docs.djangoproject.com/en/dev/ref/contrib/messages/ but I get this error: Error: No module
I did this tutorial, and configured the Hibernate API and the mapping: https://netbeans.org/kb/docs/web/hibernate-webapp.html (i'm
I followed this tutorial and the source code : http://blog.objectgraph.com/index.php/2010/04/20/encrypting-decrypting-base64-encode-decode-in-iphone-objective-c/ And then, I downloaded
This is not a dupe of Calling a method with ref or out parameters
After reading this: http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-to-use-it I came to the conclusion that it is not valid
Does a method like this exist anywhere in the framework? public static void Swap<T>(ref
I want to define a ref type variable, like this: SomeType v=null; and this

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.