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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:04:24+00:00 2026-06-16T11:04:24+00:00

I just found a nice script you can see it over here http://demo.tutorialzine.com/2012/10/css3-dropdown-menu/ I

  • 0

I just found a nice script you can see it over here

http://demo.tutorialzine.com/2012/10/css3-dropdown-menu/

I saw the drop down has a little ^ on top. On the css I could find this:

#colorNav li ul li:first-child:before{ 
    content:none;
    position:absolute;
    width:1px;
    height:1px;
    border:5px solid transparent;
    border-bottom-color:#313131;
    left:50%;
    top:-10px;
    margin-left:-5px;
}

Only I can’t understand how this is working; does it have
something to do with the border?

  • 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-16T11:04:25+00:00Added an answer on June 16, 2026 at 11:04 am

    This CSS operates on the following markup (reduced for simplicity):

    <nav id="colorNav">
        <ul>
            <li class="green">
                <a href="#" class="icon-home"></a>
                <ul>
                    <li><a href="#">Back to the tutorial</a></li>
                    <li><a href="#">Get help</a></li>
                </ul>
            </li>
            <li class="red">
                <a href="#" class="icon-cogs"></a>
                <ul>
                    <li><a href="#">Payment</a></li>
                    <li><a href="#">Notifications</a></li>
                </ul>
            </li>
        </ul>
    </nav>
    

    The selector targets the :before pseudo-element on the inner-most li elements that are also the first elements within their parent:

    #colorNav li ul li:first-child:before
    

    Missing from your code here, but present in the original tutorial, was the following comment:

    /* the pointer tip */
    

    This particular set of rules is for creating the small triangle that appears at the top of the dropdown menus, pointing up to their associated block (pictured below, emphasized with a red circle):

    enter image description here

    The styles then follow for creating this triangular shape:

    content: none;                  /* Pseudo-element has no content    */
    position: absolute;             /* It's positioned absolutely       */
    width: 1px;                     /* It has a width of 1 pixel        */
    height: 1px;                    /* And a height of 1 pixel too      */
    border: 5px solid transparent;  /* Applies initial border style     */
    border-bottom-color: #313131;   /* Overrides bottom border color    */
    left: 50%;                      /* Moves it half-way from the left  */
    top: -10px;                     /* And 10px up above the element    */
    margin-left: -5px;              /* Margin, half of width, to center */
    

    The end-result, is a triangle created purely with borders in CSS.

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

Sidebar

Related Questions

I have found a nice jquery increment script. The increment portion can accept a
I just found a nice tutorial that will help me implement an easy user
I just found out about yield return , I seems really nice. I use
just was reading this article http://highscalability.com/blog/2010/3/23/digg-4000-performance-increase-by-sorting-in-php-rather-than.html And found this nice article http://wiki.apache.org/cassandra/DataModel I just
can anyone recommend me nice tooltip script which is javascript library independent, meaning no
I have just found a nice look that I would like to use for
I've found nice feature in angularjs. Directives can be set to work on comments.
I've made a demo of what I'm trying to do here in jsFiddle: http://jsfiddle.net/clowerweb/SbNdb/
I just found out this nice SVN option that would be very useful on
I've gone through just about every property I can think of, but haven't found

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.