Solved

Overriding css for an iframe(external content)

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Jquery 7 30
Two decimal 5 26
Validating number not work with decimal 4 24
Difference between Nuget Package and using Bower/Node.Js/Gulp 2 11
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

756 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