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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:51:07+00:00 2026-05-19T00:51:07+00:00

I was under the impression that if you put a line of code in

  • 0

I was under the impression that if you put a line of code in CSS further down the style sheet it should be recognized as more important, such as:

.border{
border-right:1px solid #fff;
}

.no-border{
border-right:none;
}

So shouldn’t the no-border class over-write the first class? This is not happening on a project and do not understand why?

thanks

  • 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-19T00:51:07+00:00Added an answer on May 19, 2026 at 12:51 am

    As a quick rule of thumb, the last rule is the one that counts.

    However, this is not the case in many scenarios. You need to read up on CSS Specificity.

    Equal specificity: the latest rule is the one that counts. “If you have written the same rule into your external style sheet twice, than the lower rule in your style sheet is closer to the element to be styled, it is deemed to be more specific and therefore will be applied.”

    When selectors have an equal specificity value, such as

    #content h1 { padding: 5px;}
    #content h1 { padding: 10px;}
    

    where both rules have the specificity 0, 1, 0, 1, the latter rule is always applied.

    Unequal specificity: the more specific rule is the one that counts. “A selector can contain one or more reference points, the greater the specificity rating of these reference points the more specific your rule is.” Browsers select the most specific rules to display.

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

Sidebar

Related Questions

I was under the impression that I could put any old executable program in
I was under the impression that this code #include <windows.h> #include <stdio.h> int WINAPI
I am under the impression that the best way to style a list item
I was under the impression that the css rules in the callback function below
I was under the impression that you could put javascript in a view template
I was under the impression that using the Resolve method returned a new instance
I was under the impression that when you double click a file (or choose
I was under the impression that if I deployed my application (using Ant) then
I was under the impression that this was formed correctly, but here it is
I was under the impression that jQuery is JavaScript Framework, but when am searching

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.