1

I'm trying to use a CEWP to display an RSS feed via an HTML page. When I link to the web page in the CEWP, the RSS feed displays perfectly in the web part. However, it seems as if the rest of my site is picking up the style sheet from the CEWP, and changing the style of all content on the page.

Any workaround for this issue?

  • why not use RSS feed webpart? you'd still have to override some css from controls.css or change the class name in the xsl. – Aveenav Jun 27 '17 at 15:10
  • Can you add the code of your CEWP in your question? – Juan Pablo Pussacq Laborde Jun 27 '17 at 17:36
2

If you want to display RSS feeds you have an out of the box RSS Feed web part and you customize the CSS for that.

How To: Customize the RSS feed web part

For any business reasons if you still want to add from the CEWP then you have to make sure assign the classes to your HTML and apply styles to the HTML tags through CSS classes.

Example:

HTML

<div class="item-container">
   <p class="item-text">Hello World</p>
</div>

CSS

.item-container {
    font-size: 14px;
}

.item-container p { //.item-container .item.text
   font-weight:italic;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.