Text Wrapping for Square Slides: CSS word-break and text-wrap

Contents
- Why Card News Text Breaks in Awkward Places
- How to Fix Line Breaks with CSS
- Key CSS Properties at a Glance
- Summary
- Core Mechanics: How Do Browsers Handle Korean Line Breaks?
- CSS Line-Break Properties: Full Comparison Table
- 5 Critical Mistakes to Avoid in Card News Layouts
- A 5-Step Workflow for a Perfect Card News Layout
- 7 Card News Layout Tips
- Decision Tree: Find the Best Font Settings for Your Situation
- Key Terms Cheatsheet
- Frequently Asked Questions
When you make card news or Instagram card images, a title often breaks in the middle of a word. Sometimes one line sticks out much longer than the rest. Instead of moving line breaks by hand in a design tool like Photoshop and checking each time, you can use CSS properties like word-break, line-height, and text-wrap to keep Korean words (eojeol) from splitting. This post covers how to set those properties and how to preview the result on a 1:1 virtual canvas.
Summary ① Korean words (eojeol) get cut in the middle because of the browser's default rules when you don't set the word-break property. ② Using word-break: keep-all, line-height 1.3~1.4, and text-wrap: balance together fixes most cases. ③ Instead of changing values in code one at a time, you can use a simulator that shows the result live on a 1:1 virtual card canvas.
Why Card News Text Breaks in Awkward Places
By default, the browser breaks lines at spaces. It moves a whole word to the next line, and if the word still doesn't fit the width, it cuts it at the character level. In Korean, a particle attaches directly to a noun. The natural break point is the boundary between the noun and the particle, but the default rule can't tell where that boundary is. As a result, a word like "카드뉴스를" gets split in the middle, as in "카드뉴 스를". On a narrow square card such as 1080x1080px, the space available for text is limited, so this problem shows up especially often.
How to Fix Line Breaks with CSS
You don't need any extra software. A few CSS properties fix most cases.
You can estimate how many lines a card will wrap to like this: divide the total text width by (card width − total left and right padding), then round up (always round up, even for a small decimal). That gives you the expected line count. For example, say the total text width is 900px, the card width is 360px, and the left and right padding is 32px each (64px total). The width the text can actually use is 360 − 64 = 296px. Then 900 ÷ 296 ≈ 3.04, so rounding up, the text wraps to about 4 lines.
Three CSS Properties That Improve Readability
- word-break: keep-all: Stops Korean words (eojeol) from being cut mid-sentence and pushed to the next line, which makes text easy to misread. It forces line breaks to happen between words.
- line-height: 1.3~1.4: If the line spacing in a title is too wide, the text looks fragmented. If it's too narrow, the characters look like they overlap. Around 1.35 works well for card news titles.
- text-wrap: balance: Automatically distributes characters so each line is about the same length within the parent container's width.
Here is a CSS example for card news that keeps word breaks and font readability solid on mobile screens.
<div class="card-news-canvas">
<div class="card-text-container">
<span class="badge">MARKETING TIPS</span>
<h2 class="card-title">Tips for Readable Line Breaks in Instagram Card News Text</h2>
<p class="card-desc">A layout simulation where words wrap cleanly without being cut off</p>
</div>
</div>
.card-news-canvas {
width: 360px;
height: 360px; /* 1:1 square canvas */
padding: 32px;
background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
color: #ffffff;
display: flex;
flex-direction: column;
justify-content: center;
border-radius: 16px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.card-title {
font-size: 26px;
font-weight: 800;
line-height: 1.35;
letter-spacing: -0.5px;
/* Key settings: prevent word splitting and balance lines automatically */
word-break: keep-all;
overflow-wrap: break-word;
text-wrap: balance;
}
.card-desc {
margin-top: 12px;
font-size: 14px;
color: #94a3b8;
line-height: 1.5;
word-break: keep-all;
}
Common Things People Miss
- A particle separated awkwardly at the end of a line: To keep a particle from landing alone on the next line, add br tags between major noun phrases, or finish by declaring word-break: keep-all.
- Text contrast over a background image: If your card news uses a photo as the background, add a dimming layer behind the text, such as background: rgba(0, 0, 0, 0.4). You can also add a blur such as backdrop-filter: blur(4px). Either one keeps the text sharp.
Note Instead of opening the code, changing values one by one, and refreshing the browser, you can type your text and adjust the title, subtitle, and body font sizes, the background template, and the horizontal and vertical alignment options right on screen to see the result. Line height and word-break values are already optimized for each element and fixed, so there is no control for changing them.
Instead of editing code and refreshing every time, you can just type your text and see it on a 1:1 card right away. Try our Square Post Text Layout Simulator.
Type your text on a 1:1 square slide canvas and preview line wrapping and font alignment in real time.

Key CSS Properties at a Glance
| Property | Value | Role |
|---|---|---|
| word-break | keep-all | Korean words (eojeol) aren't cut in the middle; lines break between words |
| line-height | 1.3~1.4 | Title line spacing. Too wide looks fragmented; too narrow makes characters overlap |
| text-wrap | balance | Automatically distributes characters so each line is about the same length (ignored in browsers that don't support it, which fall back to default wrapping) |
Summary
- Korean text gets cut mid-word because the browser's default line-break rules can't tell where a particle boundary is.
- Setting word-break: keep-all makes lines break only between words.
- Using line-height 1.3~1.4 and text-wrap: balance together evens out line lengths.
- For cards with a background photo, add a dimming or blur layer to keep the text readable.
- Instead of changing code one value at a time, you can check the result live in the simulator and grab the finished style right away.
Type your text on a 1:1 square slide canvas and preview line wrapping and font alignment in real time.
Core Mechanics: How Do Browsers Handle Korean Line Breaks?
To fix these problems, you need to understand how browsers render text and how web typography works. Once you know how text gets drawn on mobile and the web, you can build layouts that hold up at any screen size.
1. The Korean Typography Engine and the word-break Property
Browser text rendering engines grew up around English and other Latin-script languages. English separates words with spaces, so breaking lines between words feels natural. Korean (and other CJK languages) works differently. It is an agglutinative language, so particles attach directly to the end of a noun with no gap.
By default, a browser tries to break Korean text at spaces. But when the parent container gets narrow, it cuts the text at the character level without hesitation (similar to the default behavior of word-break: break-all). That is how a word like "카드뉴스가" gets split awkwardly into "카드뉴" and "스가".
The key CSS fix is word-break: keep-all. With this property, the rendering engine stops applying special CJK character-level breaking to Korean text. Instead, it treats each space-separated word (an eojeol, which is a word plus the particle attached to it) as one unit. It avoids cutting a word in the middle and pushes the whole word to the next line, which prevents misreading.
2. Modern CSS Text Wrapping: How text-wrap Evolved
One of the newer properties in modern browsers is text-wrap.
text-wrap: balance: Apply it to short, bold text of about 2 to 4 lines, such as a card news title. The browser then uses a binary search or dynamic programming algorithm internally to minimize the difference in width between lines. It prevents the imbalance of one very long first line with a single word left on the last line. It also evens out the visual weight, which improves readability. Mathematically, it works by minimizing a cost function that pushes each line's length as close to the full width as possible ( $ C = sum_{i=1}^{n} (W - w_i)^2 $ ).text-wrap: pretty: This property is built to stop a lone word (an orphan) from being left on the last line of a body paragraph.
3. Visual Hierarchy and Ideal Proportions on a Square (1:1) Canvas
Card news canvases are usually designed at 1080x1080px (or 1080x1350px for a 4:5 ratio). On a limited square canvas, the ideal hierarchy of font sizes and line heights for guiding the eye looks like this:
- Title: 26–32px (based on mobile CSS rendering), font-weight 800 (Extra Bold). A title needs to grab attention, so set the line-height tight, around 1.35, to give the text a compact, solid look.
- Subtitle / Badge: 12–14px, font-weight 700 (Bold). It supports the title or tells readers the category.
- Body: 14–16px, font-weight 400 (Regular). Body text holds longer explanations, so give it a generous line-height of 1.5–1.6 to keep the lines from feeling tangled.
4. The Instagram Mobile Safe Zone
Card news is mostly viewed in mobile apps such as Instagram. On a 1080x1080px canvas, leave a margin or padding of at least 100px on every edge. This keeps the app's own UI (profile icon, "more" text button, pagination dots, and so on) from covering your image. Keep your key text and design elements inside the central 880x880px "safe zone." That way the information reaches viewers intact, with no interface getting in the way.
CSS Line-Break Properties: Full Comparison Table
This matrix groups the properties used to control line breaks and alignment in web and card news layouts by situation.
| CSS property and value | Korean behavior | English behavior | Browser support | Fit for card news |
|---|---|---|---|---|
| word-break: normal | Breaks at the character level when space runs out | Breaks line by word | Supported in all browsers | ❌ Poor fit (words often get cut in the middle) |
| word-break: break-all | Forces breaks at the character level (choppy) | Forces breaks in the middle of words | Supported in all browsers | ❌ Poor fit (text is fragmented and hard to read) |
| word-break: keep-all | Keeps each eojeol (word + particle) together | Breaks line by word | All modern browsers | ⭐⭐⭐⭐⭐ Essential (best Korean readability) |
| overflow-wrap: break-word | Cuts a long word if it overflows the container | Cuts a long word if it overflows the area | Mostly supported | ⚠️ Use as a backup for long links and URLs |
| overflow-wrap: anywhere | Can break anywhere | Can break anywhere | Recent browsers | ❌ Poor fit as a design element |
| text-wrap: balance | Automatically balances the width of each line | Evens out the text length of each line | Recent Chrome, Safari, and others | ⭐⭐⭐⭐ Strongly recommended for title text |
| text-wrap: pretty | Prevents a lone character on the last line | Prevents an orphan word on the last line | Supported in Chrome 117+ | ⭐⭐⭐ Useful for tidying body text |
| white-space: pre-wrap | Preserves line break characters and wraps automatically | Preserves line break characters and wraps automatically | Supported in all browsers | ⭐⭐ Use only when needed |
5 Critical Mistakes to Avoid in Card News Layouts
You can write perfect copy and still lose the professional look because of one small layout mistake. Here are five mistakes to check for.
- Leaving orphan words on the last line
This happens when a line break leaves just one short word, two or three characters long, alone on the last line. It badly hurts the visual balance. Edit the text length or fix it with
text-wrap: balance. - Bad line-height settings If the line-height is too tight, below 1.2, the descenders of one line collide with the tops of the letters on the next, and the layout feels cramped. If it is too loose, above 1.6, the sentences drift apart like separate objects and are hard to read as one block.
- Straying outside the 100px mobile safe zone This is when you push text too close to the edge. When the post shows up as a thumbnail in the Instagram home feed or the Explore tab, the text can get cropped or end up completely hidden behind the pagination UI at the bottom.
- Failing the WCAG 4.5:1 contrast ratio
This happens when you place text over a busy photo or pattern and ignore brightness contrast. Add a dark semi-transparent layer (
rgba(0,0,0,0.4)or darker) or apply a clear drop shadow to the text, so you reach a contrast ratio of at least 4.5:1. - Mixing font families carelessly If you mix three or more fonts in one card news set, such as a gothic, a serif, and a handwriting font, the eye scatters and the design looks messy. The cleanest approach is to pick one highly readable sans-serif font and build the hierarchy with weight differences alone.
A 5-Step Workflow for a Perfect Card News Layout
Use this five-step process to build a layout that stands out and still reads comfortably.
- Step 1: Set up a 1080x1080 square canvas with safe-zone padding First, create a 1:1 canvas in CSS or your design tool. Set at least 32px of padding on every side (100px or more in actual pixels). Add guidelines so text never crosses them.
- Step 2: Build a typographic hierarchy of badge, title, and body Put together a three-level visual hierarchy: an eye-catching badge at the top, a large bold title of 2 to 3 lines, and body text below it with the details.
- Step 3: Apply the essential CSS properties (keep-all and balance)
Use
word-break: keep-allandtext-wrap: balanceon the title. Useword-break: keep-allon the body. This gives you full control over words that get split or lines that come out ragged. - Step 4: Check background contrast and add a dimmed layer
If the slide has an image background, lay a dark gradient layer behind the text container, or apply
backdrop-filter: blurto it. This gives the text a solid base so it stands out clearly. - Step 5: Simulate a mobile viewport and fine-tune Shrink your result to an actual smartphone screen size. Check that the text isn't too small and that no line break falls in an awkward spot for Korean grammar. Then adjust letter spacing and margins in small steps.
7 Card News Layout Tips
Here are seven text design tips that creators of viral content with millions of views quietly rely on.
- Limit titles to 3 lines No matter how much you have to say, a headline becomes tiresome to read after 3 lines. If you hit 4 lines, don't shrink the font. Cut the sentence down to the key words.
- Use negative letter spacing (-0.5px) on Korean titles
Korean characters sit in large square blocks, so spacing looks wide by default. Applying
letter-spacing: -0.5px(or -0.05em) to the title makes it denser and more polished. - Add a subtle text shadow on photo backgrounds
A very light shadow such as
text-shadow: 0 2px 4px rgba(0,0,0,0.3)separates the text from the background. It keeps the text sharp on almost any photo. - Use a color accent to anchor attention on the key word If your title runs three lines, give your brand accent color (for example, a bold neon green or coral red) to just one noun or verb you want to emphasize.
- Keep margins and alignment consistent on every slide When people swipe through an Instagram carousel, text that jumps up and down from slide to slide is tiring. Whether you align left or center, keep the container's anchor point fixed through the last slide.
- Pick a sans-serif font with a wide range of weights Choose a font such as Pretendard, Noto Sans KR, or Spoqa Han Sans, with weights from Light to Black. Then a single font can give you plenty of design variety.
- Get the most out of the layout simulator before you code The Square Post Text Layout Simulator at the top of this post lets you test the ideal line breaks and font size ratios without touching code.
Decision Tree: Find the Best Font Settings for Your Situation
If you're not sure which settings to use for your text length and design ratio, follow this decision tree.
- Question 1: What kind of text do you have?
- ➔ Mostly a short, bold title
- Tighten the line height to 1.3–1.35. Use text-wrap: balance to give the title a compact, blocky shape.
- ➔ A long body with lots of explanation
- Loosen the line height to 1.5–1.6. Use text-wrap: pretty to even out the line endings for readability.
- ➔ Mostly a short, bold title
- Question 2: What are your canvas ratio and platform?
- ➔ 1:1 square canvas (Instagram profile grid)
- Space is tight, so secure 100px safe margins on the left and right first. Even if you have to shrink the font a bit, make sure the line breaks stay intact.
- ➔ 4:5 portrait canvas (optimized for the Instagram feed)
- The extra height makes it easy to spread a sentence over several lines. This is the ratio where
word-break: keep-allworks best.
- The extra height makes it easy to spread a sentence over several lines. This is the ratio where
- ➔ 1:1 square canvas (Instagram profile grid)
Key Terms Cheatsheet
These are the essential terms web designers, marketers, and publishers need to know when they work together.
- Word chunk (eojeol): In Korean, a unit of text separated by spaces. It's one meaning unit, such as a noun joined with its particle, and it's the main basis for line breaks in card news.
- Line height (leading): The vertical space between lines. In Korean typography, it's one of the most important factors in readability.
- Letter spacing (tracking): The horizontal space between characters. Korean text looks more refined when it's set slightly tighter than English (negative letter spacing).
- word-break: keep-all: A CSS property that keeps Korean word chunks from being split by character when a line wraps.
- text-wrap: balance: A modern CSS feature that has the browser distribute the length of a multi-line title evenly across its lines.
- Safe zone: The central area in a mobile app where your information stays fully visible and isn't covered by UI elements.
- Orphan word: A single word left alone on the last line of a paragraph. It makes the layout look unstable.
Frequently Asked Questions
Here are clear answers to the three questions practitioners ask most often about card news typography.
Q1. I applied word-break: keep-all, but when the mobile screen is very narrow, the text spills out of the container and breaks the layout. Why?
A1. The keep-all property tries to protect whole words at all costs. If a very long English word with no spaces (for example, Supercalifragilistic...) or a long Korean sentence with the spaces left out comes in, the browser can't find a point to break the line. It just pushes everything out on a single line. That causes overflow, where the text runs past the edge of the box. To prevent this, add overflow-wrap: break-word or the newer overflow-wrap: anywhere as a backup. The browser will still prefer keep-all, but if there is truly no room, it will force a line break and keep the layout from collapsing.
Q2. When I make Korean card news, I want to break lines at particles like "은/는/이/가," but the automatic wrapping doesn't land nicely. What's the best way to handle it?
A2. Software algorithms can't do perfect morphological analysis. That limits how precisely they can cut at the ideal spot from a design standpoint, which is the end of a noun phrase. The most reliable, old-school fix is to insert a forced line break tag, <br>, in the HTML where you want the line to break. Another option is to wrap those words in a <span> tag and apply display: inline-block. That turns them into one solid chunk that wraps as a unit. In practice, for main titles, it's still best practice to use <br> strategically instead of leaving everything to the browser.
Q3. Do you have any tips for font pairing that is highly readable and easy to combine in card news?
A3. In a limited space like a card news slide, how well the text delivers information matters more than a flashy font. For Korean text, use just one neutral font family as your main font, such as Apple SD Gothic Neo, Pretendard, or Noto Sans KR. It should support at least 5 to 6 weights. When you mix in English or numbers, using a Latin font (for example, Montserrat or Poppins) in the title adds visual rhythm. Serif (Myeongjo) or handwriting fonts should only be accent elements, such as a very short emotional phrase, and should make up less than 10% of the text. Otherwise, they hurt readability.
This article was adapted from our Korean original. Read the Korean original