User Rating 0.0
Total Usage 0 times
Category CSS Tools
px
px
px
px
px
px
px
px
px
Presets
Live Preview 300 × 200
Drag the corner to resize
Generated CSS

      
Is this tool helpful?

Your feedback helps us improve.

About

The CSS resize property allows users to manually adjust the dimensions of an element by dragging its corner handle. It requires a non-visible overflow value to function. Omitting this dependency is the most common implementation error. Without explicit min-width, min-height, max-width, and max-height constraints, a resizable container can collapse to zero or expand beyond the viewport, breaking page layouts. This tool generates correct, production-ready CSS with all necessary guard properties included.

The generator supports all four resize directions: both, horizontal, vertical, and none. Constraint dimensions are clamped to sane ranges. The live preview uses an actual browser-rendered resizable element, not a simulation. Note: resize handles are browser-dependent. Webkit and Blink render a small triangular grip. Firefox renders a two-line grip. Mobile browsers generally do not support the resize property at all.

css resize css generator resize property resizable div css tool box resize css overflow

Formulas

The resize property activates user-controlled dimension adjustment on a block-level element. The critical dependency rule:

resize none &implies; overflow visible

The effective rendered size after user interaction is constrained by:

max(min-width, min(user-width, max-width))
max(min-height, min(user-height, max-height))

When box-sizing = border-box, the constraint dimensions include padding and border. When box-sizing = content-box, they apply to content area only, and total rendered size = content + padding + border.

Where resize = the direction of allowed resizing, overflow = the overflow behavior that enables the resize handle, min-width / min-height = lower bounds preventing element collapse, max-width / max-height = upper bounds preventing layout breakage, and user-width / user-height = the dimension the user drags to.

Reference Data

PropertyValuesDefaultApplies ToNotes
resizenone | both | horizontal | vertical | block | inlinenoneBlock elements, replaced elements, table cellsRequires overflowvisible
overflowvisible | hidden | scroll | auto | clipvisibleBlock containersclip does NOT enable resize
min-widthpx, em, rem, %, vwautoAll elementsPrevents collapse below threshold
min-heightpx, em, rem, %, vhautoAll elementsPrevents collapse below threshold
max-widthpx, em, rem, %, vwnoneAll elementsPrevents overflow beyond boundary
max-heightpx, em, rem, %, vhnoneAll elementsPrevents overflow beyond boundary
widthpx, em, rem, %, autoautoAll elementsInitial width before user resize
heightpx, em, rem, %, autoautoAll elementsInitial height before user resize
box-sizingcontent-box | border-boxcontent-boxAll elementsAffects how min/max constraints interact with padding/border
block (resize)Logical property - Block elementsResizes in block axis only (writing-mode aware)
inline (resize)Logical property - Block elementsResizes in inline axis only (writing-mode aware)
textareaDefault: bothbothTextarea elementsOnly element with resize enabled by default
Browser: ChromeTriangular grip icon at bottom-right corner. Supported since v1.
Browser: FirefoxDouble-line grip icon. Supported since v4.
Browser: SafariTriangular grip. Supported since v4.
Browser: MobileGenerally unsupported. Touch interfaces lack drag handles.

Frequently Asked Questions

The resize property requires the element's overflow to be set to a value other than "visible". The most common fix is adding overflow: auto or overflow: hidden. Additionally, the element must be a block-level element or have display: block set. Inline elements and replaced elements (except textarea) may not respond to resize.
No. Mobile browsers (iOS Safari, Chrome for Android) do not render the drag handle because touch interfaces lack a precise pointer mechanism for the small resize grip. For mobile-friendly resizable elements, you must implement custom JavaScript touch-drag handlers with touch event listeners.
resize: horizontal always allows resizing along the x-axis regardless of writing mode. resize: block is a logical property that resizes along the block axis, which is vertical in horizontal writing modes (Latin scripts) but horizontal in vertical writing modes (e.g., traditional Chinese, Japanese). Use logical properties when building internationalized layouts.
With box-sizing: content-box (default), min-width and max-width constrain only the content area. Padding and border add to the total rendered size. With box-sizing: border-box, the constraints include padding and border. This means a max-width: 400px with 20px padding results in only 360px of content area under border-box, but 400px of content under content-box.
Webkit-based browsers support the ::-webkit-resizer pseudo-element, which allows limited styling (background-color, background-image). Firefox does not expose a pseudo-element for the handle. There is no cross-browser standard for repositioning or fully customizing the grip. For full control, hide the native handle with resize: none and implement a custom drag handle via JavaScript.
No. overflow: clip is explicitly excluded from enabling resize per the CSS Overflow Module Level 3 specification. Only overflow: hidden, overflow: scroll, and overflow: auto activate the resize handle. This is a common mistake because clip visually behaves similarly to hidden.