Explore Bato Web Agency Webflow Certified Partner Profile Explore Bato Web Agency Webflow Certified Partner Profile

How do you wrap long URLs and unbroken text on mobile?

Illustration without a description Illustration without a description

Use overflow-wrap: anywhere on text containers that may receive long URLs, hashes or other unbroken strings. It allows an emergency break when the token would otherwise overflow the mobile viewport. Normal text still wraps at ordinary word boundaries first.

 

.user-content,
.message,
.table-cell {
overflow-wrap: anywhere;
}

 

word-break: break-all is more aggressive and may break ordinary words at any character, making prose harder to read. Reserve it for specialized data where every character is equally breakable. The older word-wrap name is an alias for overflow-wrap.

 

For code, identifiers or file paths, consider a horizontally scrollable code block instead of breaking syntax unpredictably. Link text can be a concise human-readable label even when the destination URL is long. Do not expose tracking parameters as the visible label unless users need to copy the exact address.

 

Test user-generated content, internationalized domain names, long email addresses and zoom. Flex and Grid parents may also need min-width: 0 so the text container is allowed to shrink. Wrapping rules cannot help while an ancestor keeps a larger content-based minimum. Verify the behavior across the full width range, including spaces between design breakpoints. Long labels, translated copy and enlarged text can expose constraints that short sample content never reaches. Verify the behavior across the full width range, including spaces between design breakpoints. Long labels, translated copy and enlarged text can expose constraints that short sample content never reaches. Verify the behavior across the full width range, including spaces between design breakpoints. Long labels, translated copy and enlarged text can expose constraints that short sample content never reaches.