Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Overriding css for an iframe(external content)

Posted on 2009-07-15
4
Medium Priority
?
1,520 Views
Last Modified: 2012-05-07
HI,

I have an iframe content loaded from an external site and I would like to modify the css classes to change the look. I figured out the classes used and then created a css file for that and included it above the iframe but later I found that it cannot be done because of security reasons. Is there any other way to achieve this?

So I was thinking of loading this iframe(external) into a local iframe or div on my site using js so that now I will be able to modify the css. Is this possible? I couldn't find any good example on this.  I read little bit about this and it looks like IE browser will not work fine as it will ask the user before loading the content. Can someone help me out in finding a way to do this?

thanks!
0
Comment
Question by:Igiwwa
  • 3
4 Comments
 

Author Comment

by:Igiwwa
ID: 24859985
HI,

I have an iframe content loaded from an external site and I would like to modify the css classes to change the look. I figured out the classes used and then created a css file for that and included it above the iframe but later I found that it cannot be done because of security reasons. Is there any other way to achieve this?

So I was thinking of loading this iframe(external) into a local iframe or div on my site using js so that now I will be able to modify the css. Is this possible? I couldn't find any good example on this.  I read little bit about this and it looks like IE browser will not work fine as it will ask the user before loading the content. Can someone help me out in finding a way to do this?

thanks!
0
 
LVL 30

Accepted Solution

by:
VirusMinus earned 750 total points
ID: 24860325
No way to do this, unless you physically parse the external web page's HTML / CSS and write it  into your own web page.
0
 

Author Comment

by:Igiwwa
ID: 24860381
Thanks, you mean I should get the generated code for that iframe that is loading the content and use it on my webpage?
0
 

Author Closing Comment

by:Igiwwa
ID: 31603762
good to know that its not possible. I tried the parsing method and it didn't work either.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question