CSS min-inline-size Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Layout & Sizing

What You’ll Learn

The min-inline-size property sets how small an element can shrink along the inline axis. In everyday horizontal layouts, that usually means setting a minimum width while still letting wider content grow naturally.

01

Lower Limit

Set inline-axis floor.

02

auto Default

Content-based by default.

03

Pixels / %

Fixed and relative floors.

04

Writing Modes

Logical like min-width.

05

Content Growth

Grows above minimum.

06

Related

inline-size, max-inline-size.

Introduction

The min-inline-size property in CSS defines the minimum size of a block-level element along the inline axis. This property is useful for ensuring elements do not shrink too narrow along the inline direction of text flow, depending on the writing mode of the document.

By specifying a minimum size, you can keep cards, panels, and sections visually balanced even when content is short, which helps maintain layout consistency across different devices and screen sizes.

Definition and Usage

In horizontal writing modes such as English, the inline axis runs left to right, so min-inline-size: 300px; usually sets a minimum width. In vertical writing modes, the same property sets a minimum height instead.

Use min-inline-size with inline-size and max-inline-size for full logical sizing control on the inline axis.

💡
Beginner Tip

Think of min-inline-size as a floor: the box can grow wider (in horizontal writing), but it will not shrink below the minimum you set.

📝 Syntax

Write min-inline-size with a length, percentage, sizing keyword, or auto:

syntax.css
element {
  min-inline-size: auto | length | percentage | max-content | min-content | fit-content | initial | inherit;
}

Basic Example

min-inline-size.css
.container {
  border: 1px solid black;
  min-inline-size: 300px;
}

Syntax Rules

  • The initial value is auto, meaning no explicit minimum inline-size constraint.
  • Length values such as px, rem, and vw set a fixed lower limit.
  • Percentages are relative to the containing block’s inline size.
  • Keywords like min-content, max-content, and fit-content set a floor based on content sizing.
  • Use with inline-size and max-inline-size to define preferred and maximum inline dimensions too.

⚡ Quick Reference

QuestionAnswer
Initial valueauto
Applies toAll elements
InheritedNo
AnimatableNo
Common useCards, panels, and sections that must not collapse below a minimum inline size

🎯 Default Value

The default value of min-inline-size is auto. Without explicit styling, the element has no minimum size constraint along the inline axis and can shrink to fit its content based on other sizing properties.

💎 Property Values

These are the most common values you will use with min-inline-size.

ValueExampleMeaning
automin-inline-size: auto;No explicit minimum; content and other sizing rules determine the floor (default)
Lengthmin-inline-size: 300px;Defines a fixed minimum size using units like px or rem
Percentagemin-inline-size: 50%;Minimum size relative to the containing block’s inline dimension
max-contentmin-inline-size: max-content;Minimum follows the content’s max-content inline size
min-contentmin-inline-size: min-content;Minimum follows the content’s min-content inline size
fit-contentmin-inline-size: fit-content;Minimum based on fit-content sizing along the inline axis
Horizontal writing → min-inline-size = min-width Vertical writing → min-inline-size = min-height
300px

A fixed minimum inline size in pixels or other length units.

Ensures boxes never shrink too small.

50%

At least half of the parent container’s inline size.

Useful in responsive layouts.

auto

No explicit floor — content sets the minimum.

Default browser behavior.

fit-content

Minimum follows fit-content sizing on the inline axis.

Good for flexible components.

Min Inline Size and Writing Modes

min-inline-size follows the writing mode instead of always mapping to horizontal min-width. That is the main reason to choose it over physical properties like min-width.

Horizontal writing (writing-mode: horizontal-tb)

min-inline-size sets minimum width

Vertical writing (writing-mode: vertical-rl)

min-inline-size sets minimum height
  • inline-size sets the preferred inline dimension; min-inline-size sets the lower limit.
  • max-inline-size sets the upper limit on the same axis.
  • Logical properties help components stay correct when text direction or writing mode changes.

min-inline-size vs min-width

PropertyAxisBest for
min-inline-sizeInline axis (depends on writing mode)International layouts, reusable components, logical sizing systems
min-widthAlways horizontalSimple layouts with fixed minimum widths in horizontal writing
inline-sizeInline axis (depends on writing mode)Preferred inline dimension paired with max/min limits
max-widthAlways horizontalUpper limit on horizontal size in horizontal writing

👀 Live Preview

Three boxes with the same long text but different min-inline-size floors:

auto — minimum follows content.
10rem min — Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
14rem min — Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.

In horizontal writing, these values set a floor on inline width. Wider content grows naturally above the minimum.

Examples Gallery

Try min-inline-size with fixed floors, empty boxes, percentage minimums, and side-by-side comparisons.

📚 Minimum Inline Floors

Ensure elements never shrink below a useful inline dimension, even when content is short.

Example 1 — 300px Minimum Inline Size

Set a 300px floor on the inline axis so a container maintains at least this width in horizontal writing.

min-inline-size-300.html
<style>
  .container {
    border: 1px solid black;
    min-inline-size: 300px;
  }
</style>

<div class="container">
  This container will not shrink below 300px in width.
</div>
Try It Yourself

How It Works

The container is at least 300px along the inline axis. If content needs more space, it grows wider automatically.

Example 2 — Minimum on an Empty Box

Even with little content, min-inline-size keeps the panel from shrinking too narrow.

min-inline-size-empty.css
.panel {
  min-inline-size: 200px;
  padding: 1rem;
  background: #dbeafe;
}
Try It Yourself

How It Works

A 200px minimum keeps the panel visually balanced even when content is only one line.

📈 Responsive Minimums

Use percentages and comparisons so minimum inline sizes adapt across layouts.

Example 3 — Percentage Minimum (50%)

Set the minimum inline size to half of the parent’s inline dimension.

min-inline-size-percent.css
.parent { inline-size: 480px; }
.child {
  min-inline-size: 50%;
  background: #93c5fd;
}
Try It Yourself

How It Works

The child will never be narrower than half of the parent’s inline size. Percentages need a defined parent inline dimension.

Example 4 — Compare auto vs Two Minimums

See how the same short content behaves with auto, a tight floor, and a roomier floor.

min-inline-size-compare.css
.auto { min-inline-size: auto; }
.sm { min-inline-size: 160px; }
.md { min-inline-size: 280px; }
Try It Yourself

How It Works

With auto, the box follows content width. Minimum values keep short content in wider boxes.

🧠 How min-inline-size Works

1

The browser finds the inline axis

Writing mode decides which direction is inline. In normal English pages, that is left to right.

Writing mode
2

You set a minimum floor

Choose a length, percentage, keyword, or leave the default auto so content determines the minimum.

CSS rule
3

The browser enforces the floor

The element can grow wider when content needs more space, but it cannot shrink below the minimum. Combine with inline-size and max-inline-size for full control.

Box model
=

Predictable minimum inline size

The element never falls below your minimum along the inline axis, keeping layouts tidy even when content is short.

Browser Compatibility

The min-inline-size property is supported in most modern browsers. As a logical sizing property, it shares the same support profile as inline-size and related logical dimensions. Test across browsers when writing mode or overflow behavior matters.

Baseline · Modern browsers

Logical minimum sizing in today’s browsers

Chrome, Firefox, Safari, Edge, and Opera all support min-inline-size and related logical properties in current versions.

96% Modern browser support
Google Chrome57+ · Desktop & Mobile
Full support
Mozilla Firefox41+ · Desktop & Mobile
Full support
Apple Safari12.1+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera44+ · Modern versions
Full support

Fallback behavior

For older browsers, pair logical properties with physical ones such as min-width as a fallback.

💻
Internet Explorer No support · Use min-width or min-height instead
None
min-inline-size property 96% supported

Bottom line: Use min-inline-size confidently in modern projects, especially when writing mode or overflow control matters.

Conclusion

The min-inline-size property is a useful tool for controlling the minimum size of block-level elements along the inline axis.

By setting appropriate minimum sizes and pairing them with overflow, you can ensure elements fit well within your layout constraints. Experiment with different values to achieve a responsive and well-structured design.

💡 Best Practices

✅ Do

  • Use min-inline-size on cards and panels that should not collapse when content is short
  • Use it alongside inline-size and max-inline-size for full logical sizing control
  • Prefer logical min properties in layouts that may change writing mode
  • Combine with max-inline-size to set both lower and upper logical limits
  • Test layouts on touch devices when panels must stay wide enough for tap targets

❌ Don’t

  • Set a minimum without considering how wider content should grow
  • Assume min-inline-size always equals min-width in every layout
  • Confuse min-inline-size with inline-size — one sets a floor, the other sets preferred size
  • Expect percentages to work when the parent inline size is undefined
  • Skip fallbacks if you must support very old browsers

Key Takeaways

Knowledge Unlocked

Five things to remember about min-inline-size

Use these points when setting logical inline minimums.

5
Core concepts
📝02

auto Default

No explicit minimum limit.

Default
🔄03

Writing Mode

Follows inline axis.

Context
📈04

Content Growth Pair

Works with inline-size.

UX
🛠05

Logical Trio

min, inline, max.

System

❓ Frequently Asked Questions

The min-inline-size property sets the minimum size of an element along the inline axis. In horizontal writing, that usually sets a floor on width. The element can grow wider when content needs more space, but it cannot shrink below the minimum you set.
The default value is auto, which means the minimum inline size is determined by the element's content and other sizing rules rather than an explicit floor.
min-width always sets a minimum horizontal size. min-inline-size follows the writing mode, so it sets a minimum width in horizontal writing and a minimum height in vertical writing.
Common values include auto, length units like px and rem, percentages, max-content, min-content, and fit-content.
Yes. Percentages are relative to the containing block's inline dimension, so the parent usually needs an explicit inline-size, width, or another defined inline-axis size for the percentage to resolve predictably.

Practice in the Live Editor

Open the HTML editor, set min-inline-size, and preview logical minimum inline sizing instantly.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful