Ehsan
Ehsan

Reputation: 2285

How to neutralize border-left: 0 none with overriding

I have two css in my page first: bootstrap css and second my customized style. In Bootstrap has an style definition: border-left: 0 none; and in second style I want to neutralize it. How can I do it?

Upvotes: 0

Views: 413

Answers (2)

AppleCiderGuy
AppleCiderGuy

Reputation: 1297

would have been better had you shared your code. but, just to provide a solution, what you can do is style your HTML tags using BootStrap via. class name as a reference and you can use ID of the HTML tag as a reference to override the CSS given using a class as the reference.

you can also use inline CSS which would override any other CSS provided to the HTML tag but it's not considered a good practice in general.

Upvotes: 0

Hastig Zusammenstellen
Hastig Zusammenstellen

Reputation: 4440

Try border-left: initial;

"The initial keyword is used to set a CSS property to its default value." - W3 Schools | Initial Property

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}
div {
  width: 100px;
  height: 100px;
  background-color: gray;
  border-style: solid;
  border-width: 10px;
  border-color: black;
}
div {
  border-left: 10px;
}
div {
  border-left: initial;
}
<div></div>

fiddle

https://jsfiddle.net/Hastig/nhkuu7ks/

Upvotes: 3

Related Questions