Skip to content

Commit

Permalink
fix: Correct iframe height bug
Browse files Browse the repository at this point in the history
On rare occasions, when the page is loaded, the function `Streamlit.setFrameHeight()` could not find the height of the widget and used the default value of 150px instead. Which lead to the iframe window being above the body of the web page.

This patch adjusts the iframe height in the `base.css`, to make sure that this will not happen.
  • Loading branch information
gabrieltempass committed Mar 31, 2024
1 parent 94621ba commit 88c3c89
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions streamlit_navigation_bar/templates/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
iframe[title="streamlit_navigation_bar.st_navbar"] {
position: fixed;
z-index: 9999;
height: {{ ui.height }};
margin-top: calc(-6rem + -{{ ui.height }});
{% if margin %}
width: calc(100% - 5.125rem);
Expand Down

0 comments on commit 88c3c89

Please sign in to comment.