Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

searchbox options move other elements around (not positioned absolutely) #46

Closed
JoshElgar opened this issue May 21, 2024 · 1 comment
Closed

Comments

@JoshElgar
Copy link

temporary workaround:

    css = """
    iframe[title="streamlit_searchbox.searchbox"] {
        position: absolute;
        z-index: 10;
    }
    """
    st.markdown(f"<style>{css}</style>", unsafe_allow_html=True)
@JoshElgar JoshElgar changed the title searchbox options are not positioned absolutely searchbox options move other elements around (not positioned absolutely) May 21, 2024
@m-wrzr
Copy link
Owner

m-wrzr commented Jun 30, 2024

Thanks for providing the workaround, I've added added a new flag in 0.1.13 and listed you as a contributer.

This is afaik the only way to position it absolutely since the iFrame itself can't escape its bounds. It's still a bit problematic, since this will always apply to all searchboxes (and the searchboxes need some additional blocks to reserve space), but I guess there is also no other way of targeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants