Skip to main content

CSS Resize Generator

API reference

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.

resize declarations
 
CSS
 
HTML
 
Was this helpful?

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_HERE

Paste 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 callFrom 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

  1. Pick a resize direction. both lets users drag width and height, horizontal or vertical locks one axis, and none removes the handle.
  2. Choose the element. A div needs overflow set to make the handle appear. A textarea is resizable by default.
  3. Set the overflow. auto shows scrollbars only when content overflows, hidden clips it, and scroll always shows scrollbars.
  4. 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.
  5. 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?

  • overflow is visible. Browsers ignore resize unless overflow is auto, hidden, scroll or clip. A div defaults to visible, so set it explicitly.
  • It's an inline element. resize only applies to block-level and replaced elements. Use display: block or inline-block on a span.
  • A max size is smaller than the current size. The element can't grow past max-width or max-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 div with resize: horizontal and a min-width gives 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.

resizeresizabletextarearesize handleoverflowmin-widthmax-heightcss property

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.