CSS Resize Generator
Generate the CSS resize property for a box or textarea with a live, draggable preview. Set the resize direction, overflow and min/max size limits, then copy the CSS and HTML.
Input
Textareas are resizable by default; use resize: none or vertical to restrict them.
resize only works when overflow is not visible, so visible isn't offered.
Only used for the preview and HTML snippet.
Output
Your resizable box will appear here.
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/css-resize-generator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `css-resize-generator` tool (CSS Resize Generator) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/css-resize-generator/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="CSS Resize Generator — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per API/MCP call | From 5 credits |
|---|---|
| Need more credits? | View pricing |
Also available with
Guides
The CSS resize property adds a drag handle to an element so users can change its size. This generator builds the declaration for a box or a textarea, adds the overflow and size limits it needs, and shows a live preview you can drag.
How to use it
- Pick a resize direction.
bothlets users drag width and height,horizontalorverticallocks one axis, andnoneremoves the handle. - Choose the element. A
divneedsoverflowset to make the handle appear. Atextareais resizable by default. - Set the overflow.
autoshows scrollbars only when content overflows,hiddenclips it, andscrollalways shows scrollbars. - Set the initial size and limits. Min and max widths and heights stop users from dragging the element too small or out of the layout. Set a limit to 0 to leave it out.
- Drag the corner in the preview to test the limits, then copy the CSS and HTML.
Resize values
| Value | What it does |
|---|---|
both |
Resize width and height |
horizontal |
Resize width only |
vertical |
Resize height only |
block |
Resize along the block axis (height in normal horizontal text) |
inline |
Resize along the inline axis (width in normal horizontal text) |
none |
No resize handle |
block and inline follow the writing mode, so they still behave correctly in vertical text.
Why isn't my element resizing?
overflowisvisible. Browsers ignoreresizeunlessoverflowisauto,hidden,scrollorclip. Adivdefaults tovisible, so set it explicitly.- It's an inline element.
resizeonly applies to block-level and replaced elements. Usedisplay: blockorinline-blockon aspan. - A max size is smaller than the current size. The element can't grow past
max-widthormax-height.
Common uses
- Stop textareas breaking a layout:
resize: vertical;keeps the width fixed and lets users make the field taller. - Remove the handle entirely:
resize: none;on a textarea. Use this sparingly, since some users need a bigger field to read what they typed. - Resizable panels: a
divwithresize: horizontaland amin-widthgives a simple adjustable sidebar.
For box outlines and focus rings, see the CSS Outline Generator. For multi-column text that reflows as the box resizes, try the CSS Columns Generator.
Privacy
Everything runs in your browser. Your settings and content are never uploaded.