CSS Inset Box Shadow Generator - Online Inner Depth
Create inner shadows for a pressed or sunken effect. Visually adjust and copy the CSS. Learn inset.
UD5 Toolkit
inset Property Demo
Interactive visual tool for the CSS inset shorthand — set top, right, bottom, and left in one declaration.
inset distances
inset property?
inset is a CSS shorthand property that sets top, right, bottom, and left all at once. It works with positioned elements (those with position: absolute, fixed, relative, or sticky). It follows the same shorthand pattern as margin and padding.
Browser Support Chrome 87+, Firefox 66+, Safari 14.1+, Edge 87+
inset shorthand syntax work?
Same as margin/padding:
inset: 10pxinset: 10px 20pxinset: 10px 20px 30pxinset: 10px 20px 30px 40pxauto with inset?
Yes! auto is the initial value. You can mix auto with length values. For example, inset: auto 20px 30px auto lets the top and left be determined by the element's natural position while pinning the right and bottom edges. This is useful for flexible layouts.
inset?
All standard CSS length units: px, %, em, rem, vw, vh, vmin, vmax, ch, and more. Percentages are relative to the containing block's dimensions (width for left/right, height for top/bottom). Negative values are also allowed — they pull the element outside its containing block.
inset vs writing top/right/bottom/left separately?
Using inset reduces code by up to 75%. It's cleaner, easier to maintain, and improves readability. A single inset: 20px 40px replaces four separate declarations. It also pairs beautifully with CSS logical properties for internationalization.
inset work with CSS Grid or Flexbox?
inset only affects positioned elements. It does not directly affect grid or flex items unless those items are also positioned (e.g., position: absolute within a grid container). For non-positioned elements, use margin, padding, or grid/flex alignment properties instead.
Create inner shadows for a pressed or sunken effect. Visually adjust and copy the CSS. Learn inset.
Use isolation: isolate to contain mix‑blend‑mode and filters. See the visual difference with and without. Quick demo.
Set tab‑size to any number and see how tabs are displayed in a pre element. Essential for code snippets.
Visually experiment with Flexbox container and item properties. See the layout update in real time and copy the CSS. Learn by doing, fully interactive.
Visually configure scroll‑snap containers and items. Adjust alignment, stop behavior, and padding. Copy the clean CSS instantly.
Enter container width, number of items, gap, and flex‑basis. See the resulting sizes instantly. Plan your flex layout.
Use anchor positioning to perfectly center a popover relative to its anchor. No JavaScript. See the modern approach.
Toggle contain: strict, content, paint, layout and see how it affects rendering. Understand isolation for faster pages.
Create a 'SALE' or 'NEW' corner ribbon in pure CSS. Adjust colors, position, and text. Great for e‑commerce.
Understand @layer by visually ordering style layers and seeing which rules win. Fix specificity battles. Modern CSS architecture.
Design layered box shadows interactively and get the CSS code in real time. Adjust offset, blur, spread, and color. Essential tool for UI designers.
Browse the built‑in styles that browsers apply to HTML elements. Understand why your page looks different. Static reference.
Adjust margin, border, padding, and content sizes interactively and see the rendered box model. Get the exact CSS. Teach or learn layout.
Design a custom focus indicator with outline, offset, and box‑shadow. Preview on interactive elements. Copy the CSS.
See how scroll‑padding and scroll‑margin affect the position of elements when using anchor links or scroll‑snap. Visual.
Design neumorphic elements by adjusting box‑shadow parameters. Real‑time preview and CSS output. For modern soft UI interfaces.
Interactively add and adjust multiple box shadows on a sample element. Drag sliders for offset, blur, spread, and color. Copy the clean CSS code instantly.
Generate a random HTML/CSS card with different box model properties. Inspect and guess the size. For learners.
Design a pure CSS tooltip with custom text, position (top/bottom/left/right), and arrow. Copy the clean code.
Design a fully styled scrollbar with colors, width, and border radius. Get the CSS for Chrome and Firefox.
Design a fully styled scrollbar with colors, width, radius, and hover effects. Supports both ::-webkit‑scrollbar and Firefox scrollbar‑width.
Build a .editorconfig file by setting indentation, charset, and end‑of‑line rules for your project. Keep all contributors aligned.
Design a tooltip that appears on hover without JavaScript. Choose positioning, arrow, and animation. Copy the clean HTML/CSS.
Paste your CSS and see warnings for properties that have limited browser support. Links to CanIUse. Modernize safely.
Build a custom CSS reset by toggling which elements to normalize. Copy the resulting stylesheet. Lean and clean.
Paste HTML/CSS snippets or enter properties to test how z‑index and stacking contexts interact. Real‑time example.
Upload an image and generate the CSS to use it as a custom mouse cursor. Test it live. Fun for personal websites.
Learn how to let content extend a few pixels beyond a clip boundary with overflow‑clip‑margin. Interactive playground.
Change all alignment and justification values and see the flex items move. Indispensable for learning Flexbox.
Touch the screen and see the exact coordinates, radius, and force of each touch point. Indispensable for mobile web devs.