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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:41:54+00:00 2026-06-18T02:41:54+00:00

When using custom css along with Twitter Bootstrap that overwrites some styles is it

  • 0

When using custom css along with Twitter Bootstrap that overwrites some styles is it better to place the custom css link before or after the bootstrap-responsive css?

<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-responsive.min.css">

<!-- Your custom css -->
<link rel="stylesheet" href="css/style.css">

or

<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Your custom css -->
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/bootstrap-responsive.min.css">

and what are the pros and cons of each?

If I edit the body padding after the bootstrap-responsive.css like so:

<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-responsive.min.css">

/* Add padding for navbar-top-fixed */
body {
  padding-top: 60px;
  padding-bottom: 40px;
}

Then I must also fix the responsive layout using a media query as I have overwritten the global body style.

/* Fix to remove top padding for narrow viewports */
@media (max-width: 979px) {
  body {
    padding-top: 0;
  }
}
  • 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-18T02:41:56+00:00Added an answer on June 18, 2026 at 2:41 am

    It’s usually better to place your custom CSS after the Bootstrap CSS. I’d imagine that you’re wanting the custom CSS to override the Bootstrap CSS.

    The advantages of placing your custom styles after Bootstraps is that you can change anything that is set in Bootstraps CSS by using the same selectors that they do. Making it very easy to change minor things. If you use the same selector then the browser will use the last rules applied to an element.

    I can’t really see any advantages of placing the Bootstrap CSS after your custom CSS, it wouldn’t really make much sense to write your own styles and then override them with Bootstrap’s…

    For example, this isn’t bootstrap CSS, but it would work the same way, if you had the following in your head section:

    <link href="framework.css" rel="stylesheet" type="text/css" />
    <link href="custom-styles.css" rel="stylesheet" type="text/css" />
    

    Then in framework.css you had the following:

    div.row {
        border: 1px solid #eee;
        border-radius: 3px;
        margin-bottom: 50px;
        padding: 15px;
    }
    

    But then you realised you wanted to add a red background (why oh why…) and change the border radius, you could have the following in custom-styles.css:

    div.row {
        background-color: red;
        border-radius: 10px;
    }
    

    The resulting CSS applied to the element would be this:

    div.row {
        background-color: red;
        border: 1px solid #eee;
        border-radius: 10px;
        margin-bottom: 50px;
        padding: 15px;
    }
    

    Because the styles from custom-styles.css override the existing ones in framework.css and the additional ones are applied too! 🙂

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

Sidebar

Related Questions

I'm using Twitter Bootstrap and some custom css (found here ) to have dropdown
I'm using some components from twitter bootstrap css and have combined into a custom
I'm using less css along with twitter-bootstrap-rails in an app and I can't figure
I'm using custom controllers that cache static resources (CSS, JS, etc.) and images. I'm
I'm using the following external CSS files: <link href=/jquery_custom/green/jquery-ui-1.8.16.custom.css rel=stylesheet type=text/css /> <link href=/jquery_custom/css/blue/jquery-ui-1.8.7.custom.css
Using CSS it's easy to apply a custom color to a link when you
I'm using Bootstrap and custom CSS to develop my personal website and I have
I'm trying to create a simple theme (using Chameleon and some custom css and
Lets say that youre using Twitter Boostrap and you have their generic boostrap.css and
I'm using CSS selectors to generate custom pop-ups for a web templates - basically,

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.