Is there a way to add a vertical divider between columns. Like the st.divider() but vertical?
Hi @Odrec
Aside from st.divider()
for horizontal rule as you had mentioned, there is currently no method for a vertical divider. If youβd like to do a feature request, you can do so at Issues Β· streamlit/streamlit Β· GitHub
However, in the meantime, it may be possible to use CSS styling, consider the following example code snippets as shown below in the 2 files.
streamlit_app.py
import streamlit as st
with open("styles.css") as f:
st.markdown('<style>{}</style>'.format(f.read()), unsafe_allow_html=True)
# Other parts of your code goes below here
styles.css
p {
border-left-style: solid;
border-left-color: gray;
padding-left: 25px;
}
Hope this helps!
Hi @dataprofessor,
Can you provide guidelines how to apply it only to a column and not other parts of the app?
The current suggestion to put it on top of the file results in applying the css to all elements, which is undesired. I have also tried to apply it within a column or wrap the column around it, but with no success.