CSS hacks

Thanks again andfanilo !

Below is a screen capture where I expanded up to one of the stTextInput on my grid.
Which class should I target to reduce the overall height of all these widgets?
And how should I proceed?
I guess it should be close to the code I found to change the width of the ST page.
I reproduce it below, maybe it is very similar !

Thanks

Michel

def _set_block_container_style(
    max_width: int = 1200,
    max_width_100_percent: bool = False,
    padding_top: int = 1,
    padding_right: int = 1,
    padding_left: int = 1,
    padding_bottom: int = 1,
    ):
    if max_width_100_percent:
        max_width_str = f"max-width: 100%;"
    else:
        max_width_str = f"max-width: {max_width}px;"
        
    styl = f"""
    <style>
        .reportview-container .main .block-container{{
            {max_width_str}
            padding-top: {padding_top}rem;
            padding-right: {padding_right}rem;
            padding-left: {padding_left}rem;
            padding-bottom: {padding_bottom}rem;
        }}
        }}
    </style>
    """
    st.markdown(styl, unsafe_allow_html=True)
1 Like