How To Over Right CSS.

Forums CSSHow To Over Right CSS.
Staff asked 3 years ago

How to over-right CSS.

Answers (2)

Add Answer
Mitali Kukadiya Marked As Accepted
Staff answered 3 years ago

Yes, you can override the CSS using their parent class.
Also, use important for overrides CSS but it’s not a proper way. always first try to override CSS by using their parent class if not possible that then you can use it important.

Please review the following example of CSS override:

.owl-carousel .owl-nav button.owl-next,
.owl-carousel .owl-nav button.owl-prev,
.owl-carousel button.owl-dot {
background: 0 0;
color: #000;
border: none;
}
Body .owl-carousel .owl-nav button.owl-next,
Body .owl-carousel .owl-nav button.owl-prev,
Body .owl-carousel button.owl-dot {
color: #f00;
}

Here, you can see that override the CSS with their parent element or class.

Staff answered 3 years ago

Consider the example:

.className
{
padding:10px;
}
.className
{
padding:30px !important;
}

Here padding override and  apply 30px

Subscribe

Select Categories