Skip to main content
FlyingSaucy
Inspiring
May 16, 2025 10:38 AM UTC
Answered

Publish Documents - iframe

I'm not sure this is an InDesign specific questions, but as it relates to documents published from InDesign…

 

Could anyone tell me how I can size the hight of my iframe so that it 'snaps' to fit the content in an elegant way for different screen sizes?

 

my @36646830 css is clearly not working correctly yet…

http://www.wrdmag.co.uk 

WRD38 Spring 2025

 

<Link modified by MOD>

rob day
rob dayCorrect answer
Community Expert
May 16, 2025 2:56 PM UTC

What's the "ratio.png" image - do I need this file? The code work without the actual png.

 

It’s a 1px x 1px transparent .png, which helps with the full screen fit, if that’s what you are looking for. The path of the ratio.png is to a folder named images in the same folder as the HTML file.

6 replies

rob day
Community Expert
Community Expert
May 16, 2025 12:04 PM UTC

Hi @FlyingSaucy , See my iframe code example here:

 

https://indd.adobe.com/view/cff4e8c0-be49-45db-8069-f6fc466d9ce9

 

Translate
FlyingSaucy
Inspiring
May 16, 2025 2:06 PM UTC

Thanks for that link - that code appears to have achieved much of what I was trying to do.

A couple of questions.

What's the "ratio.png" image - do I need this file? The code work without the actual png.

is it possible to reduce the top and bottom padding/margin in the iframe?

Translate
rob day
Community Expert
rob dayCommunity ExpertCorrect answer
Community Expert
May 16, 2025 2:56 PM UTC

What's the "ratio.png" image - do I need this file? The code work without the actual png.

 

It’s a 1px x 1px transparent .png, which helps with the full screen fit, if that’s what you are looking for. The path of the ratio.png is to a folder named images in the same folder as the HTML file.

Translate
BobLevine
Community Expert
Community Expert
May 16, 2025 11:29 AM UTC

Unfortunately, there is nothing elegant or responsive about Publish Online and since you haven't really provided a link to where you're using the iframe, we can't look at it.

Translate
FlyingSaucy
Inspiring
May 16, 2025 12:03 PM UTC

Hi, the url is at the bottom of my post 😉

www.wrdmag.co.uk

 

Translate
rob day
Community Expert
Community Expert
May 16, 2025 12:06 PM UTC