Elements above columns?

Hello,

I have a Streamlit app where the content is displayed in a 2-columns layout. This works great, but is there a possibility to place elements above the two columns, spreading both ones? I want to put a markdown headline and some text above both columns.

Hi @TomZ,

Thanks for sharing this question!

Yes, you can. Just make sure the st.markdown(“you-content-here”) is outside of the columns.

Something like this:

import streamlit as st

st.markdown("you-content-here")
col1, col2 = st.columns(2)
with col1:
     # your code for col 1
with col2:
     # your code for col 2
1 Like

Great, thanks a lot, its working!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

Happy Streamlit-ing!:balloon: