import streamlit as st st.header('Scrolling Columns') cols = st.columns(3) cols[0].write('A short column') cols[1].write('Meow' + ' meow'*1000) cols[2].write('Another short column') css=''' <style> section.main>div { padding-bottom: 1rem; } [data-testid="column"]>div>div>div>div>div { overflow: auto; height: 70vh; } </style> ''' st.markdown(css, unsafe_allow_html=True)
To upload files, please first save the app
import streamlit as st
st.header('Scrolling Columns')
# Custom CSS to make columns scrollable
css = '''
<style>
section.main>div {
padding-bottom: 1rem;
}
[data-testid="column"]>div>div>div>div>div {
overflow: auto;
height: 70vh;
}
</style>
'''
st.markdown(css, unsafe_allow_html=True)
# Create three columns
cols = st.columns(3)
# Fill columns with content
cols[0].write('A short column')
cols[1].write('Meow' + ' meow'*1000) # Long repeating text
cols[2].write('Another short column')
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?