Skip to content

Markdown overflows in st.container #12366

@arnaudmiribel

Description

@arnaudmiribel

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

It looks like long Markdown lines overflow in e.g. st.container(border=True)

Image

Reproducible Code Example

Open in Streamlit Cloud

long_1 = (
    "ACME_WIDGET_RECOMMENDATION_BANNER_ALPHA_WITH_ADDITIONAL_FEATURES_AND_CUSTOMIZATION_OPTIONS"
)

long_2 = "ACME_SEARCH_RECOMMENDATION_BANNER_BETA_WITH_ENHANCED_PERSONALIZATION_AND_TARGETING_CAPABILITIES"

cols = st.columns(3)

with cols[0].container(border=True):
    st.markdown("##### Example card")
    st.markdown("Promotions:")
    st.markdown(f"- {long_1}")
    st.markdown(f"- {long_2}")

Steps To Reproduce

No response

Expected Behavior

No response

Current Behavior

No response

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.49.1.dev20250827
  • Python version:
  • Operating System:
  • Browser:

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:markdownRelated to Markdown renderingpriority:P2Medium-high priority - fix within one monthstatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions