0

I have 2 websites. 1 is a portal, the other one is a small FTP site. The FTP site gets loaded into the first site using an iframe. Problem 1: They have 2 individuel designs, but must look as one -- merged designs. Problem 2: The FTP site is accessed externally by some users (for business reason i guess), thus I cannot touch the FTP site's CSS file. So I was wondering if it was somehow possible to make the FTP site inside the iframe inherit the first site's CSS.

Is this possible?

2 Answers2

0

Yes and no.

All content in an iframe won't be styled by the outer CSS file. They are separated.

You could, however, pass a variable to your iframe containing the full path to the outer CSS file. Your page could then be modified to use the CSS file it receives through the query string.

Does this help?

Steven Lemmens
  • 1,441
  • 3
  • 17
  • 30
0

jQuery/JavaScript: accessing contents of an iframe

The second answer gives syntax for manipulating the contents of the iframe, so you could find the head tag and add a <script /> tag to it.

This will only work within the same domain, and I'm not sure if browsers would treat all "other-protocol" pages as being in the wrong domain.

Community
  • 1
  • 1
Emyr
  • 2,351
  • 18
  • 38