This is a discussion on "css style iframe content" within the Web Page Design section. This forum, and the thread "css style iframe content are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
css style iframe content
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
css style iframe content
I have xthml page with an iframe that has src="dynamic-source" for a wysiwyg editor, I'm trying to style the content inside the iframe from the page that contains the iframe. The browser sees the iframe as a separate frame therefore a separate page. As the iframe content is dynamic, I cannot include the css on the iframe's src (content page of iframe)... There must be a way to apply css style to the iframe content from the page that contains the iframe... ANY hits would be awesome!! thanks
|
|
|
|
||||
|
Re: css style iframe content
Why not have the css include dynamically as well? Pretty simple with PHP/MySQL
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
|||
|
Re: css style iframe content
Wait, maybe i havent understood, you have:
If so, you just have to reference to the content of the iframe in the css, for example:
Quote:
Keep in mind that the content of a page has to be handled by the CMS, not the structure. And i think that everything goes into <head> tag is part of the html structure. Anyway there are pretty much easier ways to achieve the result he wants without a dinamically included css. Last edited by Gwayn; Apr 20th, 2007 at 15:20. |
|
|||
|
Re: css style iframe content
Quote:
Here is the dom tree down to the iframe:
Last edited by hiropowers; Apr 21st, 2007 at 00:58. Reason: update css |
|
|||
|
Re: css style iframe content
Happy to try it... I can only reference the fileserver (not db) ... could I use include pulling in css file on fileserver? Have example?
|
|
|||
|
Re: css style iframe content
Another thought:
Could I apply a style reference in the backend (this is open source CMS) in dom where the iframe dom is created? it was there that I was able to create an id for the iframe with
Last edited by hiropowers; Apr 21st, 2007 at 01:21. Reason: put code into [code] |
|
||||
|
Re: css style iframe content
Not quite sure what the problem is, an iFrame just imports another file so why not have the css linked in the head of the other file? Even if it is dynamic you can still have a predefined structure. Oh well. Guess I misunderstood the question.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
|||
|
Re: css style iframe content
Hay, no you got it - quite spot on really, if I had set this up I would do just that, find the imported file's template and add the css at the top.... however... and this is a big however
...the backend of this cms brings in the content of the iframe by an sql query to oracle db to bring in the content div that makes up the content of the page the user wishes to edit. At the point the backend defines what is going to be edited it is purely a php/sql query to oracle db... the db stores divs as separate assets (the app server builds pages on the fly from designs made up of xhtml and css and the div assets stored in db for content).. ... in short I cannot apply a 'template' with xhtml or css or js in the backend to 'wrap' the content being dynamically brought into the iframe... I was interested in the dynamic applying css with php... but as the iframe has it's own dom I'm starting to think I cannot apply css to the content of the iframe from the page that contains the iframe... |
|
|||
|
Re: css style iframe content
Quote:
|
![]() |
| Tags |
| css iframe |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Flash content resets, when style.display is used (prob in firefox, IE fine) | call14 | JavaScript Forum | 13 | Feb 28th, 2008 13:58 |
| [SOLVED] refresh a different iframe once an iframe elsewhere has loaded | cosmicbdog | JavaScript Forum | 1 | Jan 25th, 2008 01:50 |
| Can a jsp file in an IFrame calls a javascript function outside of the IFrame | jadeite100 | JavaScript Forum | 0 | May 31st, 2007 14:29 |
| printing style sheets to provide A5 size printouts without making content smaller | paulbarris | Web Page Design | 5 | May 9th, 2007 19:37 |
| Set content for IFRAME in New Window | noodlegarage | JavaScript Forum | 0 | Feb 7th, 2007 07:44 |