22Nov

Pym.js, responsive iframe parent showing 150px height only

If you experience a problem with Pym.js and the child iframe not resizing properly this could be due to the CSS in the child iframe.

I spend ages trying to understand why the iframe I embedded was not getting to the correct size. It was a d3 graph so I thought the time it generates the graph based on the data (a little load delay).

I found the solution from that page https://github.com/nprapps/pym.js/issues/176

My body and HTML set to height: 100%; in my CSS and this was the issues. A simple bit of CSS to remove and it worked as expected to calculate the correct size of the child iframe and pass it to the parent page responsively.

Sharing this short article about this Pym.js bug in case this can save some minutes to someone ;)

Subscribe
Notify of

0 Comments
Inline Feedbacks
View all comments