Solved

Overriding css for an iframe(external content)

Posted on 2009-07-15
4
1,479 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 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now