# Best strategy to run multiple p5 sketches on a page

**URL:** <https://discourse.processing.org/t/best-strategy-to-run-multiple-p5-sketches-on-a-page/216>\
**Category:** Project Guidance\
**Created:** [May 21, 2018, 5:26pm UTC](https://discourse.processing.org/t/best-strategy-to-run-multiple-p5-sketches-on-a-page/216 "2018-05-21T17:26:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [May 22, 2018, 1:36am UTC](https://discourse.processing.org/t/best-strategy-to-run-multiple-p5-sketches-on-a-page/216/3 "2018-05-22T01:36:04Z")

</div>

> [@Jithin](#):
>
> Adjusting the size of the iframe according to the inner sketch.

Still researching the responsive canvas topic. 😓

For now I’ve got this gist which attempts to adjust the current iframe element to fit document’s body size: ☢

> <https://gist.github.com/GoToLoop/9eeb3ea918e9e149ba3c6c717cfb16e1>
>
> There are more than three files. show original

And an online sketch example using that running as 2 iframes: ✨  
[https://GoSubRoutine.GitHub.io/Ball-in-the-Chamber/](https://GoSubRoutine.GitHub.io/Ball-in-the-Chamber/)

And its corresponding repo too: ⚠

> **[GitHub - GoSubRoutine/Ball-in-the-Chamber: JS Native Modules coded in TS...](https://github.com/GoSubRoutine/Ball-in-the-Chamber)**
>
> JS Native Modules coded in TS & CS. Contribute to GoSubRoutine/Ball-in-the-Chamber development by creating an account on GitHub.

---

_[View the full topic](https://discourse.processing.org/t/best-strategy-to-run-multiple-p5-sketches-on-a-page/216)._
