🔥Limited Offer: Get 50% OFFon AI & Full Stack Courses🔥
Back to CSS Notes
Topic #162

CSS User Interface


CSS User Interface

In this chapter you will learn about the following CSS user interface properties:

  • resize
  • outline-offset

CSS Resize

The resize property specifies if (and how) an element can be resized by a user.

This property can have one of the following values:

  • horizontal - user can resize the element horizontally (the width)
  • vertical - user can resize the element vertically (the height)
  • both - user can resize the element both vertically and horizontally
  • none - user cannot resize the element

You can resize this div element in a vertical way!

To resize: Click and drag at the bottom-right corner!

CSS Resize - Only Width

The following example lets the user resize only the width of a

element:

Example

div
{

resize: horizontal;

overflow: auto;

}

CSS Resize - Only Height

The following example lets the user resize only the height of a

element:

Example

div
{

resize: vertical;

  overflow: auto;

}

CSS Resize - Both Width and Height

The following example lets the user resize both the width and height of a

element:

Example

div
{

resize: both;

overflow: auto;

}

CSS Disable Resize in Textarea

A