overflow-clip-margin

The overflow-clip-margin CSS property determines how far outside its bounds an element with overflow: clip may be painted before being clipped.

Syntax

overflow-clip-margin: 20px;
overflow-clip-margin: 1em;

/* Global values */
overflow-clip-margin: inherit;
overflow-clip-margin: initial;
overflow-clip-margin: unset;

The overflow-block property is specified as a length, negative values are not allowed.

If the element does not have overflow: clip then this property will be ignored.

Formal definition

Value not found in DB!

Formal syntax

{{csssyntax}}

Examples

HTML

<div class="box">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</div>

CSS

.box {
  border: 3px solid black;
  width:  250px;
  height: 100px;
  overflow: clip;
  overflow-clip-margin: 20px;
}

Result

Specifications

Specification Status Comment
CSS Overflow Module Level 3
The definition of 'overflow-clip-margin' in that specification.
Working Draft

Browser compatibility

BCD tables only load in the browser

See also