Extensible HyperText Markup Language

XHTML.com recommends: PSD to HTML Slicing Service

clip

Definition

The clip property specifies the area of the element that should be rendered. The screen shot below shows a div element containing an image.

Screen shot of a Web browser showing an image.

The screen shot below shows a div element containing an image, where the clip property is applied to the div element to show only a portion of the image contained by the div element.

Screen shot of a Web browser shows a clipped image.

Example

  1. div {
  2. position: absolute;
  3. clip: rect(40px, 175px, 105px, 50px);
  4. }

Characteristics

Possible values

shape
Area of the element to be clipped.
auto
The element will not be clipped.
inherit
Use the same computed value as the parent element for this property.

Default value

auto

Applies to

Elements with position property set to absolute.

Inherited

No

See also