Home > Software design >  How delete inline-style with inlinecode html class
How delete inline-style with inlinecode html class

Time:07-13

How delete "width:400px" in my code:

<div  style="width: 400px;">

I dont have access inline-code :( I must have other solved

Pleas, help.

CodePudding user response:

create a more specific rule that overrides the inline style, e.g.

.owl-item.active {
  width: initial !important; /* or auto */
}

.owl-item.active {
  border: 1px #ccc solid;
  width: initial !important;
}
<div  style="width: 400px;">div</div>

Note: that value is a result of some JS logic under the hood, so if you need to override that width it may be worth to check the settings of the carousel instance and the style applied.

  • Related