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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:19:03+00:00 2026-06-17T14:19:03+00:00

I just stumbled upon css specificity, while trying to change the pagination style of

  • 0

I just stumbled upon css specificity, while trying to change the pagination style of my theme.

I’m using twitter-bootstrap as a base-template, but I want to change pagination.

Specifically, I want to remove the pagination border that comes with will-paginate bootstrap :

The will-paginate/bootstrap

.pagination a {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    border-color: #DDDDDD;
    border-image: none;
    border-style: solid;
    border-width: 1px 1px 1px 0;
    float: left;
    line-height: 34px;
    padding: 0 14px;
    text-decoration: none;
}

I just need this :

.pagination a {

    float: left;
    line-height: 34px;
    padding: 0 14px;
}

The problem is that if i set this in my custom.css.scss file, then bootstrap specificity is higher (check this great explanation on specificity) than mine. I even tried and use !important, but it still did not got my specificity higher.

I have solved this problem by just using the Equal specificity rule – the one that comes last, with equal specificity, is the one that counts, and just put :

.pagination a {
        -moz-border-bottom-colors: none;
        -moz-border-left-colors: none;
        -moz-border-right-colors: none;
        -moz-border-top-colors: none;
        border-color: #DDDDDD;
        border-image: none;
        border-style: none;
        border-width: 1px 1px 1px 0;
        float: left;
        line-height: 34px;
        padding: 0 14px;
        text-decoration: none;
    }

But this is just trashy css, because i don’t need the border at all…

What would you suggest?

  • 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-17T14:19:04+00:00Added an answer on June 17, 2026 at 2:19 pm

    Just try border: none; instead of resetting every sub-property.

    Also, I just checked Bootstrap’s selector for pagination and it’s more specific than that:

    .pagination ul > li > a, .pagination ul > li > span
    

    Try using that selector instead for your border: none.

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

Sidebar

Related Questions

I just stumbled upon an interesting bug... Still trying to figure out what is
I have stumbled upon the world of javascripting and css just moments ago and
I just stumbled upon a change that seems to have counterintuitive performance ramifications. Can
I just stumbled upon this question Are "while(true)" loops so bad? They made me
Just stumbled upon this in a borrowed css file - something I've never noticed
Just stumbled upon this and found the answer while writing the question - since
Just stumbled upon propertyGrid and its awesome! However, i have one task that i
I just stumbled upon a behavior which surprised me: When writing: int x =
I have just stumbled upon the bash syntax: foo=42 bar=$[foo+1] # evaluates an arithmetic
I've just stumbled upon Fabric and the documentation doesn't really make it obvious how

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.