How to center the entire notebook when embedded as an iframe?

Hello,

I have my notebook embedded as an iframe in a github static page:

Github static page

It would look better if the entire notebook can be centered rather than left aligned.

I tried to play with the HTML to no avail. Is there any way to center it?

Thanks.

You might have a look here: Substratum / Saneef H. Ansari | Observable …Saneef demonstrates how to pass styling parameters to embedded notebooks.

If you don’t mind having it centered while editing, then adding the following somewhere in your first Markdown cell should do the trick:

<style>.observablehq-root {margin: 0 auto; width: max-content; max-width: 100%}</style>