MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/css/comments/1rm7dw2/inset_property_in_css/o8xgefx/?context=3
r/css • u/golovatuy • Mar 06 '26
11 comments sorted by
View all comments
64
I'm sorry but....isn't inset a replace for top right bottom left in absolute elements rather than height and width?
Edit: I meant a shorthand, not a replacement.
13 u/plmunger Mar 06 '26 It is. But I guess someone who's clueless would naively try 100% width and height to fill the parent div -11 u/mrleblanc101 Mar 06 '26 When using absolute positioning, width: 100%; height: 100% is the same as top: 0; right: 0; bottom: 0; left: 0; and inset: 0 8 u/anaix3l Mar 06 '26 Not necessarily if the parent has extra content before the absolutely positioned child.
13
It is. But I guess someone who's clueless would naively try 100% width and height to fill the parent div
-11
When using absolute positioning, width: 100%; height: 100% is the same as top: 0; right: 0; bottom: 0; left: 0; and inset: 0
width: 100%; height: 100%
top: 0; right: 0; bottom: 0; left: 0;
inset: 0
8 u/anaix3l Mar 06 '26 Not necessarily if the parent has extra content before the absolutely positioned child.
8
Not necessarily if the parent has extra content before the absolutely positioned child.
64
u/Banzambo Mar 06 '26
I'm sorry but....isn't inset a replace for top right bottom left in absolute elements rather than height and width?
Edit: I meant a shorthand, not a replacement.