0
Can a margin affect on total size of width and height?
All I know is that margin is a space around the box and padding is a space inside the box But here I saw something different? I saw the margin affected the width of a box Can someone explain it to me? I got confused
4 Antworten
+ 1
where did you see it?
0
I saw here in solo learn in CSS box model section
0
coal hi,
You can make some simple tests with the developper tools of your browser by inspecting elements...
Even try differents browsers as they can have differents default setting for elements.
0
You might find answers here:
https://medium.com/launch-school/https-medium-com-dembasiby-understanding-the-css-box-model-b005a82593a6#:~:text=It%20is%20important%20to%20note,bottom%2C%20and%20margin-left.
https://stackoverflow.com/questions/36098920/do-we-include-margin-in-css-box-model-while-determining-width-or-height-of-a-ele