![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I am showing existing html documents in an iframe. ... What I would like to do is have a failsafe way to munge the document, changing it by adding margin space on the left and right of 50px each. |
|
My idea is that I have to parse the existing css rules for body, if any and save them. Then I have to insert my own div tag between body> and </body> which takes the existing doc's body css and applies it to my inserted div. Then I have to strip all of the body css from the munged document, and make it have my own margins. Is this going to work? If so, can anyone tell me details that I've overlooked, and/or some example css. |
#3
| |||
| |||
|
|
In article d706bcb1-9a7f-417f-8fbc-639f28ed6fa9...oglegroups.com>, Andy <p7eregex (AT) gmail (DOT) com> wrote: Hi, I am showing existing html documents in an iframe. ... What I would like to do is have a failsafe way to munge the document, changing it by adding margin space on the left and right of 50px each. Why do you want to do this in particular? Are you wanting to improve the original author's plan? For what purpose exactly? So it somehow stands out better on *your* page? If so, what is the difficulty, just use your own padding and margin on the element that contains the iFrame. Sure, the iFrame is an inline element. But it can be the only resident of a block element if you wish. |
#4
| |||
| |||
|
|
On 2009-10-24, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote: In article d706bcb1-9a7f-417f-8fbc-639f28ed6fa9...oglegroups.com>, Andy <p7eregex (AT) gmail (DOT) com> wrote: Hi, I am showing existing html documents in an iframe. ... What I would like to do is have a failsafe way to munge the document, changing it by adding margin space on the left and right of 50px each. Why do you want to do this in particular? Are you wanting to improve the original author's plan? For what purpose exactly? So it somehow stands out better on *your* page? If so, what is the difficulty, just use your own padding and margin on the element that contains the iFrame. Sure, the iFrame is an inline element. But it can be the only resident of a block element if you wish. Or use marginwidth and marginheight on the IFRAME which do exactly what the OP wants, strange though it sounds, which is effectively to put margins on the BODY of the document inside the IFRAME. |
![]() |
| Thread Tools | |
| Display Modes | |
| |