Margins and padding cause a lot of confusion amongst new developers. This video is the start of a deep dive miniseries taking a look at them.
This video is really a look at the very basics of margins and padding, what each one do, and what the differences are between the two of them.
I also take a look at how auto margins work, and why & how we can use them to center something vertically on the screen. In this section though, I did forget to mention that for these to work, the element also needs to have an assigned width as well (thanks to Jon for pointing that out in the comments)!
Part 1: The Very Basics (this video)
Part 2: Collapsing margins and box-sizing - • Margin and Padding Deep Dive: Collaps...
Part 3: Using Whitespace effectively - • Margin and Padding Deep Dive: Using w...
---
My Code Editor: VS Code - https://code.visualstudio.com/
How my browser refreshes when I save: • How to automatically refresh your bro...
---
Support me on Patreon: / kevinpowell
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.
Instagram: / kevinpowell.co
Twitter: / kevinjpowell
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
On this page of the site you can watch the video online Margin and Padding Deep Dive: The basics with a duration of hours minute second in good quality, which was uploaded by the user Kevin Powell 12 December 2017, share the link with friends and acquaintances, this video has already been watched 73,088 times on youtube and it was liked by 3 thousand viewers. Enjoy your viewing!