Summary
Hi! I’m looking for a way to make one tab scrollable and second one not. It’s quite easy to turn-off scroll for the whole app, however I find it quite hard to “hack” css in a way that will turn-on scrolling only for the first tab.
Steps to reproduce
Code snippet:
Tabs code:
import streamlit as st
tab1, tab2, tab3 = st.tabs(["Cat", "Dog", "Owl"])
with tab1:
st.header("A cat")
st.image("https://static.streamlit.io/examples/cat.jpg", width=200)
st.write("Some very long text to make tab scrollable")
with tab2:
st.header("A dog")
st.image("https://static.streamlit.io/examples/dog.jpg", width=200)
st.write("Some very long text to make tab scrollable")
with tab3:
st.header("An owl")
st.image("https://static.streamlit.io/examples/owl.jpg", width=200)
st.write("Some very long text to make tab scrollable")
Css turning-off scrolling for the whole app:
section[tabindex="0"] {
overflow: hidden;
}
Expected behavior:
First tab is scrollable and second is not