Solved

Overriding css for an iframe(external content)

Posted on 2009-07-15
4
1,504 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 250 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

630 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