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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:39:42+00:00 2026-06-11T14:39:42+00:00

I have a really basic list in HTML that looks like this: <div id=navmenu>

  • 0

I have a really basic list in HTML that looks like this:

<div id="navmenu">
    <ul>
    <li>photography</li>
    <li>&#149</li>
    <li>people</li>
    <li>places</li>
    <li>things</li>
    <li id="lastElement">about</li>
    </ul>
</div>

My CSS formatting looks like this:

div#navmenu li {
     display: inline;
     margin-right: 40px;
}

However, I want the last li element’s margin-right be 0px. So I did:

li#lastElement {
     margin-right: 0px;
}

When I check on Chrome’s dev tools, this last CSS specification is crossed out. I don’t understand why it’s overridden by the “div#nav menu li” property? Isn’t the last li element with its own id more specific?

Any help would be appreciated. Thanks in advance.

  • 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-11T14:39:44+00:00Added an answer on June 11, 2026 at 2:39 pm

    The one that is overriding it is more specific, it has two tag and an id selector, while your other only has a tag and id selector.

    You could change it to div#navmenu li#lastElement or make the other selector less specific.

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

Sidebar

Related Questions

I have created a really basic project (Make) like this: (ede-proj-project zrm :name zrm
I have a long list of HTML in this format: <div id=item555> Some name
This is probably a really basic question - but I have a list of
I realize this question is pretty basic, but I'm really stuck. I have a
I have a list of items that are in this format: 05/01 – Some
I know that this is really basic, but I looked everywhere and I cant
I have an HTML page (PHP, really) with a table cell that contains a
I have this really basic code in a MVC controller action. It maps an
You'll have to forgive me if this is a really basic question; I haven't
I have this project i'm working on and id like to add a really

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.