# Fixed width columns

**URL:** <https://discuss.streamlit.io/t/fixed-width-columns/115042>\
**Category:** Custom Components\
**Tags:** discussion\
**Created:** [June 10, 2025, 5:52pm UTC](https://discuss.streamlit.io/t/fixed-width-columns/115042 "2025-06-10T17:52:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![A117](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@A117](https://discuss.streamlit.io/u/A117)\
**Post date:** [June 10, 2025, 5:52pm UTC](https://discuss.streamlit.io/t/fixed-width-columns/115042/1 "2025-06-10T17:52:55Z")

</div>

Getting tired of using ratios to define st.columns since it all falls apart as soon as the user resizes their screen. Anyone had luck creating fixed + variable width columns in Streamlit? For example, a list of [100, 0.8, 0.2] would create 3 columns, first with a fixed width of 100px, 2nd fills 80% of the remaining space and the 3rd fills the final 20%.

Been trying to implement this using just st.columns + CSS but it is impossible to target the correct set of columns on the page (if streamlit added a `class` arg to all components that would massively simplify so much with custom CSS…).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [December 7, 2025, 5:53pm UTC](https://discuss.streamlit.io/t/fixed-width-columns/115042/2 "2025-12-07T17:53:15Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
