KevDevMan
KevDevMan

Reputation: 818

Ignore CSS of site

I believe this is impossible but i am hoping someone has a trick or solution.

Site A has its own HTML and CSS styles defined wants to use a third party component from Service B. Service B provides its own HTML and CSS so it can render its component.

Is there a generic way to ensure the CSS of Site A does not override or effect the CSS of Service Bs component?

Lets say Site A has the following CSS

 -- Site A Css
 button{
     color:#fff;
 }

Compoonent B has a button element but does not change the button color. So as we stand, Service Bs button will have a color of #fff.

Is there a way to to ensure that Component Bs button (and all of Component Bs other elements) ignore the CSS of site A.

Upvotes: 0

Views: 79

Answers (2)

freewheeler
freewheeler

Reputation: 1356

Set attribute in html.

#button { color:#fff; }

<div id="button" style="color:red !important;"></div>

Upvotes: 0

Rajesh
Rajesh

Reputation: 3014

you can use an iframe :

 <iframe src="..third party site"></iframe>

Upvotes: 1

Related Questions