Confused about Padding in CSS

The user in the image says:

Zero in the ‘padding’ means that the left and right red areas in the image called “padding” don’t exist and that the ‘margin’ will shrink following the ‘padding’ change, without changing its values (the margin’s values stay the same).

Why the margin shrink when the padding are 0 ???
shouldnt be margin become bigger?

The margin has its own thickness, from the border to the outside, but it shirnks if the border or what’s inside get smaller without changing thickness, as the overall thing gets smaller

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.