expertis
asked on
Can I change CSS of html document loaded through iFrame
I have an html document that has an iframe which is loading a complete html document which has the html, head and body tags. I can't seem to get the right selectors to make changes to this document in the iframe. Is it possible to change this document loaded through an iframe?
Here is an example of what I've tried;
#content .column#Middle iframe#results-iframe div#SearchResultsPageNavig atorShell .SearchResultsPageNavigato rShell
I've tried lot's of other variations with no success. I would appreciate any direction someone could provide.
Thanks,
Spencer
Here is an example of what I've tried;
#content .column#Middle iframe#results-iframe div#SearchResultsPageNavig
I've tried lot's of other variations with no success. I would appreciate any direction someone could provide.
Thanks,
Spencer
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
I've been able to change some elements of an iframe from the parent page, but not others, specifically the head contents. If there are tags in the body with IDs, or form fields, you can generally change them but as mplungjan said, the pages need to be on the same server. i.e. you cannot change the appearance of -- www.google.com just because you embed it into your iframe !!
ASKER
Thanks for the responses. It is a remote server (not the same domain), so it looks like I will need to fetch the contents using PHP for parsing and insertion into my local html document.
Thanks.
Thanks.
1. please be aware of copyright issues
2. You may be able to get the contents from the other site with their cooperation (rss/javascript/WebService +JSON)
2. You may be able to get the contents from the other site with their cooperation (rss/javascript/WebService
ASKER
Thanks for the follow-up. The page being retrieved is results data we are paying to have listed on the remote site. That company wants us to use their data, they just don't make it very flexible. Unfortunately the company doesn't yet offer webservices, RSS or JSON.
Thanks.
Thanks.