• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 426
  • Last Modified:

css in iframe

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
bhomass
Asked:
bhomass
  • 2
2 Solutions
 
imantasCommented:
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
 
bhomassAuthor Commented:
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
 
imantasCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now