4 replies [Last post]
myidiot
Offline
newbie
Last seen: 17 years 50 weeks ago
Joined: 2004-10-12
Posts: 10
Points: 0

Hi!

I am trying to get my stylesheet to work, not only on the HTML page from where the stylesheet is loaded, but also on the HTML page being loaded onto the page using an IFRAME.

I am trying for quite some time without success. I hope you guys could point me to the right direction.

Thanks a lot!!!!

Chimpenstein
Offline
newbie
Last seen: 17 years 52 weeks ago
Joined: 2004-10-04
Posts: 6
Points: 0

maybe try this

Not sure if this is the problem without seeing the code but try attaching the style sheet (or style info)to the html page that is the content of the iframe.

I have just tried this and it def works.

Hope this helps

Stu

myidiot
Offline
newbie
Last seen: 17 years 50 weeks ago
Joined: 2004-10-12
Posts: 10
Points: 0

Styling iFrame Content

Thanks a lot for the response. Your method Definitely works, however, I would like to define all the Styles in ONE stylesheet. It's a lot easier to manage, plus I can do all the JavaScript tricks (e.g.. switching between different Stylesheet )

Hope to get more feedback from you. Thanks!

Chimpenstein
Offline
newbie
Last seen: 17 years 52 weeks ago
Joined: 2004-10-04
Posts: 6
Points: 0

Styling iFrame Content

if you put the link to your stylesheet in the iframe page as well as your 'main' page that will work fine. That way you are still able to use the same stylesheet. Not too sure about how all the javascript stuff would work though

Cheers Stu

obsidian
Offline
Enthusiast
South Carolina
Last seen: 15 years 49 weeks ago
South Carolina
Joined: 2004-08-15
Posts: 136
Points: 0

Styling iFrame Content

as long as your javascripts are pointing to the right frames and your styles are switching accross all the pages, i tend to agree with chimpenstein that your best bet is just to link to the page from the actual html document you have imbedded in the iframe. i would recommend setting apart anything that is supposed to go within your iframe page by surrounding the whole content in something like a <div id="iframe"> tag or something. that way, on your style sheet, when you switch, you can declare exactly what you want to happen inside your iframe or outside respectively.

hope this helps

You can't win, you can't lose, you can't break even. You can't even get out of the game!