Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

css in iframe

Posted on 2011-02-16
3
Medium Priority
?
420 Views
Last Modified: 2012-05-11
it appears the page inside an iframe does not respond to css included in the parent page. is that correct?

I used javascript to add in a <link> tag with css. I can see the <link> tag using firebug, but the css file does not even load.

does any one understand why?
0
Comment
Question by:bhomass
[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
  • 2
3 Comments
 
LVL 8

Assisted Solution

by:imantas
imantas earned 500 total points
ID: 34912686
That is correct. The page in the iframe is almost completely seperated from the parent. Assume it is a new window opened but embed into the other. You have to load your css inside the iframe.
0
 

Author Comment

by:bhomass
ID: 34913463
I wonder if any one has experience with this.

I think the reason I am not able to dynamically insert css is because the iframe is in editor mode.
0
 
LVL 8

Accepted Solution

by:
imantas earned 500 total points
ID: 34915485
If you're trying to add CSS to an iframe from the javascript code in the parent frame, then it won't work. It's like a controling one tab from another in your browser. For security reasons this is impossible, and thank god it's made that way.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

618 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