Hello,
I have my notebook embedded as an iframe in a 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.
Hello,
I have my notebook embedded as an iframe in a 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>
Hi, this solution doesnāt seem to work for me?
Notebook link: Untitled / Fangyi Zhu | Observable
Github page: https://fangyizhu.github.io/guerilla-ai/
I suspect what you want to do is center the embed on the GitHub page? In that case, try this:
<body>
<iframe style="width: 600px; height: 2000px; border: none; margin: auto; overflow: hidden; z-index: 999999; display: block;" src="https://observablehq.com/embed/e0f39b6f8dda005b"></iframe>
</body>
There are a couple of issues:
max-content
). Observableās default CSS wraps text at 640px.