I am a new web designer creating a website for a realtor, and I using a URL provided to me with a listing of homes to display. I put the URL in as an iframe src and I am getting the results listing on the page, but I don't like the way the list looks. Is there a way to override the stylesheet for the website in the iframe so I can use my own?
Asked
Active
Viewed 78 times
0
-
Before you attempt to tackle this problem, please read about same origin policy. http://en.wikipedia.org/wiki/Same-origin_policy . It will save you lot of time. – srijan Dec 04 '14 at 18:13
-
1See this http://stackoverflow.com/questions/217776/how-to-apply-css-to-iframe – Zach Leighton Dec 04 '14 at 18:14
1 Answers
0
If the <iframe>
is from the same domain, the elements are easily accessible via javascript/jquery
$("#iFrame").contents().find("#someDiv").removeClass("redBG");
But you cannot override styles of iframe content by using you own css alone.

srijan
- 1,504
- 1
- 13
- 24
-
While technically true, this is probably not helpful if the OP wants to apply more than a couple one-off style changes. – Josh KG Dec 04 '14 at 18:25