We would like to create a rounded rectangle around multiple streamlit containers to (visually) indicate that they are related.
When using streamlit columns, we can achieve this by modifying the styling for the stHorizontalBlock:
st.markdown("""
<style type="text/css">
div[data-testid="stHorizontalBlock"] {
border:10px;
padding:30px;
border-radius: 10px;
background:#FFFFFF;
}
</style>
""", unsafe_allow_html=True)
However, this does not allow for grouping of a combination of single and multi column blocks, like:
st.title("Hello World") # we would like to include this in the rounded rectangle
columns = st.columns(2) # the custom css will only be applied to this block
st.dataframe(df) # we would like to include this in the rounded rectangle
We would like to create one rounded rectangle that includes both the title and the next columns
Is there a way to achieve this?