After embedding the streamlit app in an iframe and deployed to production, I am getting this
Which is not present when running on local URL. Is there any way to hide it?
After embedding the streamlit app in an iframe and deployed to production, I am getting this
You may try this @Dev_D
hide_streamlit_style = """
<style>
footer {visibility: hidden;}
</style>
"""
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
I tried multiple things which did not work
hide_st_style = “”"
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
header {visibility: hidden;}
div.embeddedAppMetaInfoBar_container__DxxL1 {visibility: hidden;}
“”"
st.markdown(hide_st_style, unsafe_allow_html=True)
Perhaps this has something valuable as it was active relatively recently: Remove "built with streamlit" when embedding app on another page · Issue #6722 · streamlit/streamlit · GitHub
Using /?embedded=true
(rather than /embed=true
) at the end of your iframe src=URL gets rid of the Balloon-Built with Streamlit-Fullscreen footer. But it puts the top menu toolbar on (including the Github fork option etc) which is arguably worse.
The only way I’ve found to get rid of the footer is to cover it up. The html below puts the iframe in a wrapper and then puts a mask on top of the Balloon-Built with Streamlit-Fullscreen footer using the .hidefooter
style class. In this case the mask is 150px wide to hide the ‘Fullscreen’ bit (I don't mind the other bit). But if you change the .hidefooter
width to 100% that will cover the whole thing.
<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
margin: 0;
}
.wrapper {
position: relative;
z-index: 1;
display: inline-block;
width: 100vw;
}
.hidefooter {
position: absolute;
width: 150px;
height: 35px;
background: rgb(242,240,246);
right: 0px;
bottom: 0px;
z-index: 2;
display: block;
color: rgb(0, 0, 0);
}
iframe {
display: block;
background: #ffffff;
border: none;
height: 99vh;
width: 99vw;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="hidefooter"></div>
<iframe src="https://<<your.app.URL>>/?embed=true">
<p>Your browser doesn't support iframes</p>
</iframe>
</div>
</body>
</html>
(Add your own content to the footer by putting it between <div class="hidefooter"></div>
tags.)
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.