It is usually best to place your own CSS after Bootstrap CSS. I would suggest that you want custom CSS to override Bootstrap CSS.
The advantages of posting your custom styles after Bootstraps is that you can change everything that is installed in CSS Bootstraps using the same selector as they are. Make it very easy to change minor things. If you use the same selector, the browser will use the latest rules that apply to the element.
I donβt see any benefits of posting Bootstrap CSS after your custom CSS, it really doesn't make sense to write your own styles and then override them with Bootstrap's ...
For example, this is not bootable CSS, but it will work the same if your section of the chapter has the following:
<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 realized that you want to add a red background (why and why ...) and change the radius of the border, you can have the following in custom-styles.css :
div.row { background-color: red; border-radius: 10px; }
The resulting CSS applied to the element will be as follows:
div.row { background-color: red; border: 1px solid #eee; border-radius: 10px; margin-bottom: 50px; padding: 15px; }
Since the styles from custom-styles.css override existing ones in framework.css and additional ones are added! :)
source share