Reputation: 41
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
I'm building a web page. The style of the web page uses bootstrap. In the following is some css. However, as shown in the picture above, the middle line is not applied. Can you tell me why?
Upvotes: 1
Views: 42
Reputation: 487
The strikethrough basically means that the style you are trying to apply is overridden by another style that applies these styles to the same element.
This could be because you called bootstrap which overrides your style declaration. This could be overcome by linking your .css file after linking bootstrap CSS or you could use the !important
keyword after each style which will force your style.
.card-danger{
background-color: #d9534f !important;
border-color: #d9534f !important;
}
If this doesn't work, then link the style file after the bootstrap css.
I don't know more about this because I don't know the structure of the element you have used to style. It is more advisable to not use '!important' as it is bad engineering and later on the project, you will get the same kind of errors but it will get the job done I hope.
Upvotes: 3