📘 inset - shorthand for top, right, bottom and left
top
right
bottom
left
inset has no effect on non-positioned (static) elements.
inset
.element { /* ⭐️ must be positioned */ position: absolute; inset: 1em 2em 3em 0; /* top right bottom left */ inset: 10% 5% -10%; /* top left/right bottom */ inset: 0 10px; /* top/bottom left/right */ inset: 20px; /* all edges = 20px */ }
Last updated 3 years ago
Was this helpful?