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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:58:03+00:00 2026-06-12T04:58:03+00:00

i am facing a very strange problem. From what i understand by the CSS

  • 0

i am facing a very strange problem. From what i understand by the CSS “>” than selector is that it basically applies style to the direct childs only. But i am not able to get the styles applied to the elements at all. What’s strange is while inspecting the elements i can see the other CSS part in firebug but i can’t see the “>” styles applied.

HTML i have is :

<div id="navigation">
    <ul>
       <li><a href="#">First</a></li>
       <li><a href="#">Second</a></li>
       <li><a href="#">Third</a></li>
       <li><a href="#">Fourth</a></li>
    </ul>
</div>

The CSS part is this:

/* Navigation */
#navigation {
    min-height:45px;
}

#navigation ul {
    list-style-type: none;
    margin: 0px 45px 0px 0px;
    font-weight: bold;
    border-left-width: 1px;
    border-left-style: solid;
    border-left-color: #F3F3F3;
}

#navigation ul li {
    margin: 0px;
    float: left;
    position: relative;
}

#navigation > ul > li {
    line-height: 26px;
    display: block;
}

#navigation > ul > li > a {
    border-right: 1px solid #F3F3F3;
    color: #333;
    display: block;
    font-family: 'Trebuchet MS';
    font-size: 15px;
    padding: 10px 18px 13px;
    position: relative;
    text-decoration: none;
    z-index: 1000;
}

#navigation > ul > li.current_page_item > a, 
#navigation > ul > li.current_page_parent > a, 
#navigation > ul > li.current_page_ancestor > a {
    border-top: 3px solid #72AC4B;
    color: #72AC4B;
    font-family: 'Trebuchet MS';
    margin-top: -3px;
}

all other style is being applied as it normally would, but the style blocks that use “>” selector are not being recognized at all. So say suppose if i inspect the li element, i am able to see the following style applied:

#navigation ul li {
    margin: 0px;
    float: left;
    position: relative;
}

But i can’t see the following style applied:

#navigation > ul > li {
    line-height: 26px;
    display: block;
}

even though it is a direct child of the ul. Has anyone faced this problem before ? What might be causing 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-12T04:58:04+00:00Added an answer on June 12, 2026 at 4:58 am

    Assuming that the HTML example you provided is the full piece of code that you’re trying to apply these styles to, I don’t see how there could be any conflicts occurring to warrant using the direct descendant selector (>).

    Just use the child selector for the whole thing.

    /* Navigation */  
    #navigation {
        min-height:45px;
    }
    
    #navigation ul {
        list-style-type: none;
        margin: 0px 45px 0px 0px;
        font-weight: bold;
        border-left-width: 1px;
        border-left-style: solid;
        border-left-color: #F3F3F3;
    }
    
    #navigation ul li {
        margin: 0px;
        float: left;
        position: relative;
        line-height: 26px;
        display: block;
    }
    
    #navigation ul li a {
        border-right: 1px solid #F3F3F3;
        color: #333;
        display: block;
        font-family: 'Trebuchet MS';
        font-size: 15px;
        padding: 10px 18px 13px;
        position: relative;
        text-decoration: none;
        z-index: 1000;
    }
    
    #navigation ul li.current_page_item a, 
    #navigation ul li.current_page_parent a, 
    #navigation ul li.current_page_ancestor a {
        border-top: 3px solid #72AC4B;
        color: #72AC4B;
        font-family: 'Trebuchet MS';
        margin-top: -3px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing very strange problem. After debugging from my side, I thought to
I am facing the very strange problem in HTML/CSS.I am using chrome 12.0.742.122. Now
I am facing a very strange problem that my J2ME application .jar file is
I am facing a very strange problem where the same loop keeps giving me
I'm facing a apparently very strange problem (I must be doing something wrong, just
I am facing a very strange issue. I have a SharePoint webpart that displays
I am facing a very strange problem with editingStyleForRowAtIndexPath method. I am planing to
A very standard example of the problem that I am facing is that of
I'm facing with an old problem that it made me confuse very much. So
I am facing a very strange problem. I have a grid and when i

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.