0
votes

Currently I use w3.css to a html page and use it in content editor webpart. The issue here is the CSS is affecting the whole page.How do I get the css to apply only to the content editor webpart.

I used the below link option 4 to add the content editor and the HTML file http://sharepoint.hannahswain.eu/2014/10/10/adding-a-code-snippet-to-page-content-on-sharepoint-2013/

1
Have you considered using an iframe or Page Viewer web part instead?Thriggle

1 Answers

0
votes

If you are using the same classes then of course all the elements that have those classes will be affected. If in your webpart you assign unique css classes to the elements, only they will be affected. The web part is simply hosted on the page thus being a part of the page. If you tale a look at the source code of the page then you'll see that the web part is just another element on the same page.