How can I make colored borders of specified thickness appear around containers? E.g.
secondrow1, secondrow2, secondrow3, secondrow4 = st.columns([3,2,4,4])
secondrow1title = "**" + 'Public domain books in progress:** (' + str(len(public_domain_files)) + ')'
secondrow1.markdown(secondrow1title)
with secondrow1.container(): # I want a border around this container
with st.form(key="PublicDomainBooks"):
selected_file = secondrow1.selectbox("Select a file to work on:", public_domain_files)
submitted = st.form_submit_button("Work on this file")
if submitted:
run_this_file = os.path.join(public_domain_path, selected_file)
subprocess.call(['open',run_this_file])
with secondrow2.container(): # I want a border around this container
with st.form("Contracted Titles In Progress"):
st.markdown("**Royaltied Titles With Duty to Publish:**")
contracted_files = get_filenames(contracted_path)
selected_file = st.selectbox("Select a file to work on:", contracted_files)
submitted = st.form_submit_button("Work on this file")
if submitted:
run_this_file = os.path.join(public_domain_path, selected_file)
subprocess.call(['open',run_this_file])
If you go into dev tools in the browser you can identify the CSS class and then use st.markdown() to inject it into the dashboard.
The issue comes from the fact that a lot of the time the css selectors are not specific enough and so its hard to apply styling to one individual element.
@fredzannarbor Can you show me a screenshot or sketch of what you’d ideally want? Then I can add this to our feature requests, so we can see if and how we can best support this.
Hi! I think the idea is the one on the following link:
Now, I´m using st.expander (opened by default) that could mimic a card, with borders and you can include an element like a chart or image, …
The idea is to have the same functionality as the one created as a custom component but without the problems involved in creating a new custom component like using react, js, etc. and organize the cards as containers.
I just wanted to keep this open and add +1 since this is something I’m looking for too
Basically, it’d be nice to be able to put a border/box around a set of info on a page to make it look nicer
In my case this is similar to using PPT and either a) inserting a text box and giving it borders or b) putting a square with no fill around a set of info