Solved

Overriding css for an iframe(external content)

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
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…

867 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

15 Experts available now in Live!

Get 1:1 Help Now