overflow-clip-margin
Quick Summary for 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.
Code Usage for overflow-clip-margin
overflow-clip-margin: 20px; overflow-clip-margin: 1em;  /* Global values */ overflow-clip-margin: inherit; overflow-clip-margin: initial; overflow-clip-margin: revert; overflow-clip-margin: unset; 
More Details for overflow-clip-margin

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: revert; overflow-clip-margin: unset; 

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

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

Formal definition

Initial value0px
Applies toall elements
Inheritedno
Computed valuethe computed
Animation typediscrete

Formal syntax

<visual-box> || <length [0,∞]>

where <visual-box> = content-box | padding-box | border-box

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
CSS Overflow Module Level 3 # overflow-clip-margin

See also

Related CSS properties: text-overflow, white-space, overflow, overflow-inline, overflow-x, overflow-y, clip, display

Last modified: Aug 12, 2021, by MDN contributors

Select your preferred language English (US)日本語 Change language

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
I'm a big believer in energy and the secret and that sort of thing.
Unknown
Random CSS Property

border-inline-start

The border-inline-start CSS property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet.
border-inline-start css reference