Vertical divider?

Is there a way to add a vertical divider between columns. Like the st.divider() but vertical?

1 Like

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.

  1. 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
  1. styles.css
p {
  border-left-style: solid;
  border-left-color: gray;
  padding-left: 25px;
  }

Hope this helps!