-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
worse alignment between st.button & st.selectbox for v1.24 #6914
Comments
@imjuangarcia @sfc-gh-jgarcia is this a part of the core changes do you think? |
@willhuang1997 I'm not sure, but can take a look and let you know. We did modify the height of |
Noting that if this is related to the changes to |
Hello, I would like to suggest that the kind of alignment described by the OP become a feature, so we don't have to relly on hacks to achieve the desired behavior. This is the hack that I'm using: import streamlit as st
cols = st.columns([2,1])
cols[0].selectbox("Selectbox", [])
cols[1].markdown("<div style='width: 1px; height: 28px'></div>", unsafe_allow_html=True)
cols[1].button("Button") It would be nice to be able to do something like this: |
@nidoro i would add better integration with css overall. More than adding 10+ custom args to every widget. There's a st_extra utils for this. But due bad integration with css from st, works kinda poorly (and requires a lot of effort, feels kinda a hack) |
@iuiu34 Agreed, more css control would be even better. But I think that for the situation discussed here in particular, users should not be required to mess with CSS and guess how much margin they should put on the top of a button in order to align it with elements on the sides, even if this kind of CSS customization becomes a |
Hey, we just started some work on vertical alignment, see update here. Please follow on that issue for more news! For CSS customization, you can follow #3888. |
Going to close this issue because we're pretty advanced on the vertical alignment solution and will ship that soon. Will update on the issue linked above, please comment there if you have more feedback! |
Checklist
Summary
hi,
in v1.23, with a
you could align horizontally st.button and st.selectbox.
But with v1.24 this doesn't seem possible anymore.
v1.23
v1.24
with st.write('# ')
without
thanks
Reproducible Code Example
No response
Steps To Reproduce
No response
Expected Behavior
No response
Current Behavior
No response
Is this a regression?
Debug info
Additional Information
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: