Changing width of columns

The columns feature is awesome. I wonder if there is a way to control the column widths. In the example below, only half of the space is used. I would prefer to have the buttons right aligned and the texts to take up more space.

here is my code:

for index, row in self.projects.iterrows():
            col1, col2 = st.beta_columns(2)
            with col1:
                st.markdown(f"**{row['name']}**({row['short_name']})", unsafe_allow_html=True)
                st.markdown(row['description'])
            with col2:
                if st.button(label='Open',key=row['id']):
                    pass

sorry, found my answer reading the manual… :wink:
it is done using the spec parameter, e.g.

col1, col2 = st.beta_columns([6,1])
            with col1:
                st.markdown(f"**{row['name']}**({row['short_name']})", unsafe_allow_html=True)
                st.markdown(row['description'])
            with col2:
                if st.button(label='Open',key=row['id']):
                    pass 
```

It would be nice to be able to define the adjustment of the items, so I could right adjust the buttons.
1 Like