min-width

« CSS « CSS Reference

Summary

The min-width CSS property is used to set the minimum width of a given element. It prevents the used value of the width property from becoming smaller than the value specified for min-width.

Syntax

min-width:  <length> | <percentage> | -moz-max-content | -moz-min-content | -moz-fit-content | -moz-available

Values

length
See <length> for possible units.
percentage
Specified as a <percentage> of containing block's width.

Mozilla Extensions

-moz-max-content
New in Firefox 3 The intrinsic preferred width.
-moz-min-content
New in Firefox 3 The intrinsic minimum width.
-moz-available
New in Firefox 3 The containing block width minus horizontal margin, border and padding.
-moz-fit-content
New in Firefox 3 The same as -moz-min-content.

Examples

table { min-width: 75%; }

form { min-width: 0; }

Notes

min-width overrides both max-width and width .

Specifications

Browser compatibility

  • Desktop
  • Mobile

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 1.0 (1.0) 7.0 4.0 2.0.2 (416), buggy before
applies to <table> no yes no yes no
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support ? ? ? ? ?

Tags (3)

Edit tags

Attachments (0)

 

Attach file