SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can i apply css style sheet to a page viewer webpart ?

share|improve this question
To the webpart itself or to the contained page? – Alex Boev Mar 9 '12 at 17:45
i want to add in the contained page . I want to apply different styles to the content inside the page viewer wp. – Nikhil Jangle Mar 12 '12 at 14:38
up vote 3 down vote accepted

A page viewer web part is essentially a glorified iFrame, so you can do anything that you would normally be able to do with an iFrame (such as target specific elements of the web page within the iFrame with JavaScript). CSS styling of content within an iFrame is possible in some scenarios, but typically very unreliable across multiple browsers.

If we're talking SharePoint 2010 then (as a best practice) anything you deploy should be supported in IE, Firefox, Safari, and if you're Service Pack 1 or above, Chrome. Many targeted CSS solutions don't work reliably across all browsers. There's a thread here that discusses some of the options.

share|improve this answer

Solution : Found a solution by doing programatically

Added a custom control to the page which will apply style sheet dynamically. So when i try to open the page the pageviewer runs the code and apply style sheet dynamically. This is best and easiest of solution

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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