This is a migrated thread and some comments may be shown as answers.

css inside RadMultiPage RadPageView impacts whole page

3 Answers 134 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Pino
Top achievements
Rank 1
Pino asked on 14 Apr 2014, 07:56 PM
We have a MultiPage in part of our app, it's essentially an email preview here:
<code> 
<telerik:RadPageView ID="RadPageView1" runat="server" Visible="true">
                        <div id="divHTMLContent" runat="server">
                            </div>
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageView2" runat="server" Visible="true">
                        <div id="divPlainText" runat="server">
                            </div>
                    </telerik:RadPageView>
</code>

The problem arises that the HTML Content can contain styles, such as
<code>
<style type="text/css">    
 body      {      
      background-color: #efefef;
      color: #777777;
      font-face: Garamond !important;
      }
</style>
</code>

(deliberately chosen to demonstrate the effects)

These global styles are indeed global. In another context, I was able to <ol><li>introduce an iframe <li>HTMLEncode the content and <li>use jQuery to load the iframe at render time</ol> Any suggestions on how to get similar behaviour?



3 Answers, 1 is accepted

Sort by
0
Magdalena
Telerik team
answered on 17 Apr 2014, 10:10 AM
Hello Stephen,

I would like to clarify that after I reviewed the provided code I did not notice any iframe element. Please find attached a sample project that includes two RadPageView controls and the provided styles. Could you please explain how to go further with your scenario in order to replicate the issue you are facing?

It will be very helpful if you modify the attached project and send it back to us for further investigation. Since this a forum thread the attachments are not allowed I would suggest opening a new support thread where you are able to attach the project files.



Looking forward to your reply.

Regards,
Magdalena
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Pino
Top achievements
Rank 1
answered on 25 Apr 2014, 03:29 PM
I said "in another context I introduced an iframe" - I can't see how to do that trick here so I need another approach.
0
Ivan Zhekov
Telerik team
answered on 01 May 2014, 05:22 AM
Hello,

In HTML5 there is a "scoped" attribute defined for the style element and what it does is to apply the styles only to the container of the style element.

But, that's and attribute that is fairly new and not all browsers support it, which in terms mean that some browsers will be OK and other wont.

Regards,
Ivan Zhekov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TabStrip
Asked by
Pino
Top achievements
Rank 1
Answers by
Magdalena
Telerik team
Pino
Top achievements
Rank 1
Ivan Zhekov
Telerik team
Share this question
or