Forum Moderators: not2easy

Message Too Old, No Replies

style the html inside an iframe?

can the same iframe be styled differently from different pages?

         

edzillion

2:37 pm on Apr 22, 2008 (gmt 0)

10+ Year Member



I have an iframe pulling in a html doc containing news headlines
<iframe src="news.htm" frameborder="0" height="800" scrolling="no">

If I name the divs in the news.html doc:
<div id="newsItem">
<ul>
<li>news item 1</li>
<li>news item 2</li>

I want to be able to declare the style for 'newsItem ul' in the calling page. This means I can style the news.htm html differently depending on which page I call it from.

Any ideas?
Ed

swa66

12:07 am on Apr 24, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll need to use some server side scripting as far as I know: let your web server get the content you need (e.g. read a RSS feed) and then put it in the page dynamically.

Allowing a page to control things in an iframe would be opening a can of worms regarding cross site scripting.