For my website I want to use two css-files, one which is the Twitter Bootstrap (bootstrap.css), and one of my own (erikstyle.css). The reason for doing this is that for the most part, I want to use the bootstrap styles, but I want the freedom to make minor changes to the style without altering the original file.
So, a sample page has the following:
<link rel="stylesheet" type="text/css" href="../styrkesite/Bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="../styrkesite/css/erikStyle.css"/>
And I'm using the style 'kbd' from bootstrap.css
kbd {
padding: 2px 4px;
font-size: 90%;
color: #fff;
etc.
}
and I have altered the color in erikstyles.css like this:
kbd
{
color: red;
}
Problem is, the erikstyle.css style-change (i.e. the color) doesn't kick in. If I, however, change erikstyle.css to
kbd
{
color: red !important;
}
it works. So, I know that both files are referenced properly and are working as intended, but I would like to avoid having to add the !important for each and every alteration...
As far as Google says, the order of the css file references on the page makes sure that in case of any conflicting style elements (in this case the color), the style element in the css-file referenced last would take precendence (i.e. the color from erikstyle should be used, and the remaining elements should be taken from bootstrap)
I've tried adding
title="persistent"
and
title="preferred"
to the css-file reference, as suggested elsewhere, but to no effect.
Anyone has any leads for this?
Thx :)