Margin and Padding Deep Dive: Using whitespace to make our designs look better

  Рет қаралды 42,841

Kevin Powell

Kevin Powell

Күн бұрын

Пікірлер: 119
@Grewal0007
@Grewal0007 6 жыл бұрын
Wow I like this series very much..this is totally different from other leading youtubers. Hope you will make more like this. Thanks
@KevinPowell
@KevinPowell 6 жыл бұрын
Thanks Gurpreet!
@TheGorillafoot
@TheGorillafoot 6 жыл бұрын
I've been a developer for over 10 years now and I really like your channel. Gives me a lot of fresh ideas and methods that I never would have considered.
@KevinPowell
@KevinPowell 6 жыл бұрын
That means a lot to me, thanks for taking the time to let me know!
@mateuszb4387
@mateuszb4387 7 жыл бұрын
this in-depth series is awesome. And more practical than one would think. I would love the series: Z-Index, Stacking contexts and what the opacity and transforms got to do with it.
@KevinPowell
@KevinPowell 7 жыл бұрын
Glad you liked the series Mateusz! And thanks for the suggestion 👍
@Utchinsons
@Utchinsons Жыл бұрын
thankz for the series ! years later still giving to ppl !
@raaghavendrahm4883
@raaghavendrahm4883 3 жыл бұрын
It was an incredible series, Kevin! Now makes much sense about using padding vs. margin. Thank you!
@whamjampamham
@whamjampamham Ай бұрын
Here from your Scrimba Responsive CSS Course. When you said "it looks kinda small eh" I was like wait is he Canadian and checked the channel region. From Toronto here, love your tutorials, and really like your project based teaching style, hard to find people who teach with actual projects while explaining their though process.
@fabianpetersen2452
@fabianpetersen2452 2 жыл бұрын
Hi Kevin, i'm new to css and this was the best ever, i basically spotted all my mistakes vs what the pro's do 😀
@taariqq
@taariqq 4 жыл бұрын
Whether it is tips or challenges. Everything in small bits -- Kevin technique -- works much better. Thanks.
@lucasgasenzer
@lucasgasenzer 6 жыл бұрын
Haha. Somehow you made me think about Bob Ross when you were adding just a liiiiitle bit of padding...
@KevinPowell
@KevinPowell 6 жыл бұрын
Hahah, very awesome.
@joeldcanfield_spinhead
@joeldcanfield_spinhead 5 жыл бұрын
I know this video is ancient, but I'd love to see more on design concepts like this. I can learn code easily, but my knowledge of design is spotty.
@CharlesSmall
@CharlesSmall 4 жыл бұрын
As a beginner i learn everyday from your videos.
@ДианаДиана-с1г
@ДианаДиана-с1г 2 жыл бұрын
I watched all 3 parts. It's amazing! Thank you so much! I am now going to practise all the stuff that I've learned
@SYPCWAK
@SYPCWAK 4 жыл бұрын
Thanks, Kevin! As always, your tutorials are very helpful.
@throughdaniel
@throughdaniel 5 жыл бұрын
Great mini series! Very helpful for us beginners 🤓
@newera1110
@newera1110 5 жыл бұрын
Thanks a lot man, your videos are pretty clear to understand and really helpful.
@therealmujtaba
@therealmujtaba 5 жыл бұрын
finally someone knows proper UI and CSS.. hands down... Subscribedddd
@dildgemckenzie8597
@dildgemckenzie8597 6 жыл бұрын
Enjoying all your videos Kevin. Amazing content and thoughtfully explained - and displayed. Thank you.
@KevinPowell
@KevinPowell 6 жыл бұрын
Thanks!
@WEBskie_pl
@WEBskie_pl 2 жыл бұрын
Awesome content! You use very easy English that’s why non-native people can easily understands you! I have to check more your videos! ☺️😁👌🤘
@Laughingattimes2128
@Laughingattimes2128 4 жыл бұрын
Thanks man it was great. I was having a lot of trouble in understanding how to manage the space . Now it makes sense.
@MiguelVargas-pz5zv
@MiguelVargas-pz5zv 5 жыл бұрын
2nd time watching this series. I will be working on finishing my course on Udemy then will rewatch this series and hopefully catch and understand new things.
@yamunaa5367
@yamunaa5367 4 жыл бұрын
Great video series.. Keep up the good work Sir👍 Loving CSS.. And feel much motivated to learn.. Gaining confidence that I can improve on my CSS..
@judyespana4929
@judyespana4929 3 жыл бұрын
I found this incredibly helpful. Thank you for making it. I hope you continue to make more videos like these.
@BGP_23
@BGP_23 3 жыл бұрын
This video was awesome, thank you so much. I now have to go back and redo my class assignment lol. You are an awesome content creator and deserve way more subs.
@MathinusG
@MathinusG 6 жыл бұрын
Love it Kevin. Learned a lot. The real life application makes a big difference.
@darwin9111
@darwin9111 6 жыл бұрын
Amazing videos. Thank you so much for sharing. I've learned a lot since I started watching them, and have created some things based on your tutorials!
@KevinPowell
@KevinPowell 6 жыл бұрын
Very awesome Darwin, I'm glad that they've helped you out!
@milangerloff5252
@milangerloff5252 5 жыл бұрын
thank you Kevin ! yes indeed we learned something new ,i used to struggle with padding and margin no the picture is more clearer.
@hassanlearning4086
@hassanlearning4086 4 жыл бұрын
You make CSS fun and easy to comprehend. Thanks
@themarksmith
@themarksmith 7 жыл бұрын
Loved the series - interested to see how you would make the card responsive (using em/rem?) and in terms of other video series ideas, I'm interested in understanding more on how to hook buttons/forms up to to JavaScript events (sending and receiving data to node for example) - Thanks for your work!
@KevinPowell
@KevinPowell 7 жыл бұрын
Thanks for the suggestion Mark! Maybe I could do a video focusing on decision making for making things responsive at one point as well, and some of the considerations we need to take for different screen sizes. Sounds like that could easily spiral out into a series, but it could very much be worth exploring. For this card, the main thing I'd focus on is the width of it, and the image placement, as it would have to move somewhere on a small screen (probably the top?). I'd shrink down a lot of the white space as well. The smaller the area you have to work, the less overall white space you'll use, even though the relationships are often similar (if I have different spaces at 3em, 2em, and 1em, they might become 1.5em, .75em, and .5em, so smaller, but still relative to one another).
@yevheniiskomorokhov2048
@yevheniiskomorokhov2048 6 жыл бұрын
Thank you a lot Kevin, I really enjoy watching your tutorials!
@KevinPowell
@KevinPowell 6 жыл бұрын
Glad to hear that Yevhenii!
@wonga07
@wonga07 7 жыл бұрын
Really loving this series kevin!
@KevinPowell
@KevinPowell 7 жыл бұрын
Glad to hear that Stephen :D
@insaneviruss
@insaneviruss 6 жыл бұрын
Really enjoying your vids. Some topics (if you can cover) 1. Display types and their quirks (like margin padding on inline) 2. Nested Divs and spacing, scrolling, height auto, height 100% Also, I love your thought process, design tips & pacing. You can do long walkthrough videos of webpage designs. Maybe, just the normal work that you might be doing. It would be cool!
@KevinPowell
@KevinPowell 6 жыл бұрын
Thanks for the suggestions :) - I have a few series where I build out a full page, might be what you are after!
@vivekdaiya9324
@vivekdaiya9324 2 жыл бұрын
as a general rule of thumb, always add a background color while coding as it will make your life a hell lot easier, plus we don't really look at Inspector Tool that often while coding.
@bijkashama4964
@bijkashama4964 2 жыл бұрын
This is great. Very helpful
@saurabhsoni1759
@saurabhsoni1759 5 жыл бұрын
Thanks Sir, This series is really awesome, thanks a lot.
@ashrafulhaque8710
@ashrafulhaque8710 4 жыл бұрын
Awesome tutorial! More than a paid course.
@KevinPowell
@KevinPowell 4 жыл бұрын
Glad you liked it that much 😊
@DiamondConnect-r6i
@DiamondConnect-r6i Жыл бұрын
This was very helpful.
@Glow0110
@Glow0110 5 жыл бұрын
Love these breakdown video so much! You're providing so much value here. One question - do you use wordpress or webflow to build websites, and then use custom styling, or where does this kind of in depth knowledge come into play for you? Are you building stuff from scratch?
@christopherikpat5512
@christopherikpat5512 6 жыл бұрын
Thanks for what you're doing Kevin. I have gotten better since I started following your page. Your style is awesome. Please can you do a video about box-shadow? It's one of the CSS elements I struggle to grasp. Thanks
@KevinPowell
@KevinPowell 6 жыл бұрын
I've had that on my list for awhile now Christopher! I'll be having a similar series to this one on it, maybe as soon as this week.
@AlanNeese
@AlanNeese 7 жыл бұрын
I really enjoyed the DEEP DIVE!
@KevinPowell
@KevinPowell 7 жыл бұрын
Glad to hear that Alan!
@AlanNeese
@AlanNeese 7 жыл бұрын
I looked at the list of your videos and I don't see very many that use SASS. Could you do a deep dive on SASS? Thanks and Merry Christmas.
@KevinPowell
@KevinPowell 7 жыл бұрын
I use Sass a fair amount in my videos I think, even if it's not in the title or description, I just don't make it much of a focus though. My two more recent series do use it though, and I have something special planned for it in the new year as well!
@indieNik
@indieNik 7 жыл бұрын
I actually wait for your videos Kevin :) Thank you so much!!!
@KevinPowell
@KevinPowell 7 жыл бұрын
You'll have a bit less waiting a lot of weeks now, since I'll have a few videos! Hope they never disapoint though! hah.
@clevermissfox
@clevermissfox 9 ай бұрын
It’s wild to watch this video from 6 years ago, being familiar with KPows content. Would be interesting to watch him refactor the code as I’m positive he would approach it differently these days! Esp in terms of using pixels
@Ioannnify
@Ioannnify 6 жыл бұрын
Thanks Kevin, just discovered you and like what you do!
@KevinPowell
@KevinPowell 6 жыл бұрын
Thanks, glad you like my videos!
@asdffacil
@asdffacil 2 жыл бұрын
Thanks Kevin
@christinegivens9048
@christinegivens9048 4 жыл бұрын
Seriously good content. Thanks. Would love more. Subscribed with bell. Yay!
@pradeepn7
@pradeepn7 5 жыл бұрын
Please make a video on CSS design titbits to give us guidelines on better design, for example, you said that whenever you have a background always give it padding, such tips are very helpful, There can be a lot of such tips which will go a long way to make our design better. Thanks
@KevinPowell
@KevinPowell 5 жыл бұрын
I plan on doing some more design related stuff in the not too distant future :)
@milleniummoses
@milleniummoses 7 жыл бұрын
The video helped fill in a couple gaps I had in my knowledge. Because of you I've not only learned about Unsplash which I have subsequently used, but I now know about their placeholder images. Golden! Thanks. Is there a way to donate one-time and not recurring?
@KevinPowell
@KevinPowell 7 жыл бұрын
I love their placeholder images. As fun as it is to use something like fillmurray.com, after awhile the joke runs out, lol. As for a one-time donation, there is no 'official' way to make one. I have had someone in the past do that by signing up for Patreon, waiting for the payment to go through, and then canceling. A little more work on your part sadly, but it's the only option at the moment.
@milleniummoses
@milleniummoses 7 жыл бұрын
That's a thought. I can't do much right now, but, when business gets more stable, I plan to say "Thank you".
@iloveisrael7837
@iloveisrael7837 5 жыл бұрын
Best lesson
@jhred3315
@jhred3315 3 жыл бұрын
I like it! Thank you!
@the_kickers_of_the_coconut6375
@the_kickers_of_the_coconut6375 4 жыл бұрын
i really love your videos! very great, thanks
@hassanchehab1871
@hassanchehab1871 3 жыл бұрын
great vid
@tokomeno9533
@tokomeno9533 6 жыл бұрын
great i love videos like this very much not lot content like this on youtube
@KevinPowell
@KevinPowell 6 жыл бұрын
Thanks a lot Toko, and glad I can fill that hole :).
@dannydai1
@dannydai1 5 жыл бұрын
good lesson!
@hefalump56
@hefalump56 7 ай бұрын
Hi Kevin, What is the story with the gap between the image at min-height =100% and the box-sizing = border-box, when the content and padding height is less than the image height? It looks to be about 4px.
@abdulkadirguven1173
@abdulkadirguven1173 2 жыл бұрын
Thanks a lot Kevin. But i didn't understand a point. Why did you use Sass? You didn't make use of nesting or any other features of Sass.
@mehdibenzzine9746
@mehdibenzzine9746 5 жыл бұрын
Thank you sir
@shrookwageh5976
@shrookwageh5976 5 жыл бұрын
awesome
@ronidey380
@ronidey380 6 жыл бұрын
Thank you so much sir, you are awesome ✌️✌️✌️
@johnmx8255
@johnmx8255 6 жыл бұрын
This was awesome Kevin. Although I can't seem to find the naming conventions link you mentioned would be in the comments. Also on that note, what other important resources would you recommend for a self-teaching web developer like me? Great video as always.
@KevinPowell
@KevinPowell 6 жыл бұрын
That's because I forgot to put the link :( - Thanks for mentioning it, I added it in now - getbem.com/naming/
@arthurradium5823
@arthurradium5823 4 жыл бұрын
really nice video. everything is explained very well. but at the end you rush into a lot of things.. first: with overflow hidden, then the fast tweak with min.height and flex1 and flex 2 at the end....very confusing.
@ninjaaljun7674
@ninjaaljun7674 2 жыл бұрын
awesomeeeee
@kristosy
@kristosy Жыл бұрын
When applying hover color on buttons I see it is common to make it darker when hovering. However, I think they should get brighter when hovering. I feel like when it becomes brighter it is like the button is saying "Oh oh! Yes, click on me!", while when it gets darker it is more like "Why are you pointing at me? Go away.. can't you see I am trying to hide?"... Is it just me that thinks making it darker feels wrong or is there some science behind this?
@amirani836
@amirani836 3 жыл бұрын
why button didn't shrink when it got padding? why he got extra width?
@effabletechnologies5187
@effabletechnologies5187 7 жыл бұрын
dear kevin subscribed . really like the contents. how can i solve the different browser problem while using css grid.
@KevinPowell
@KevinPowell 7 жыл бұрын
I have a whole series on creating a page with CSS grid, but this is the first video that specifically gets into creating fallbacks for browsers that don't support it: kzbin.info?o=U&video_id=wceTVt111OM
@seemsas
@seemsas 7 жыл бұрын
Thank you.
@KevinPowell
@KevinPowell 7 жыл бұрын
You're welcome :D
@Bah-wf5cf
@Bah-wf5cf 3 жыл бұрын
thanks
@bloxzyo
@bloxzyo 3 жыл бұрын
Thank uuuuu
@kosticivan3921
@kosticivan3921 4 жыл бұрын
I've just got one question unrelated to the point of the video :) what exactly happened at 8:09 with the image, did it zoom in a lot or?
@KevinPowell
@KevinPowell 4 жыл бұрын
I was using a placeholder service for the image, and when the page refreshed it loaded in a different image
@bloc-notes6751
@bloc-notes6751 5 жыл бұрын
Merci !
@tommyzDad
@tommyzDad 7 жыл бұрын
Kevin, stupid question--considering I just watched all three of your videos in a row--but isn't _box-sizing: border-box_ supposed to alleviate the issue with the container growing in size when adding padding and margin? Or is it because you're adding padding and margin to the *content* -- the headings, paragraphs, and link-- that the container _div class="card"_ is growing? Did I just answer my own question?
@KevinPowell
@KevinPowell 7 жыл бұрын
With border-box, margin still adds to the total size, but padding and borders do not. But I only set a width, not a height, so the card grows in height as I add content and space that content out, so pretty much what you said 😁
@tommyzDad
@tommyzDad 7 жыл бұрын
Thanks, Kevin. I appreciate the quick reply.
@rupeshogale4384
@rupeshogale4384 6 жыл бұрын
Thanks dear bro
@KevinPowell
@KevinPowell 6 жыл бұрын
No problem!
@driznacc
@driznacc 7 жыл бұрын
Where is the codepen? Or better yet what did you name the codepen? I can't find it
@KevinPowell
@KevinPowell 7 жыл бұрын
Oops. codepen.io/kevinpowell/pen/XzLgBm/
@space_monkey125
@space_monkey125 7 жыл бұрын
Hi kevin, I want to design a website where I have a left menu, header and a footer, which are static always. Depending on what I choose in menu the content of the page changes, but menu and header remains the same. How can achieve it ? Do I need to use template, or use js? Please help
@KevinPowell
@KevinPowell 7 жыл бұрын
You could use an I suppose, but s have some issues on iOS I believe. You could do it with JS as well, but I'd very much wonder about the performance issues. Mind you, there are enough portfolio things where you can sort the portfolio items visible by topic... you could probably steal a page from that book to get it to work. CodePen probably has some good examples. Question though, is why exactly you don't want it to simply load in a new page. The header, footer and left menu could simply be there on every page, in the same position anyway.
@space_monkey125
@space_monkey125 7 жыл бұрын
Kevin Powell I didn't understand, about loading a new page? (last part)
@space_monkey125
@space_monkey125 7 жыл бұрын
How to do it!! 😌
@KevinPowell
@KevinPowell 7 жыл бұрын
Instead of loading in different content into a single page, couldn't they all just be different html documents?
@space_monkey125
@space_monkey125 7 жыл бұрын
Kevin Powell ok I'll do it that way
@prettycolddeath
@prettycolddeath 6 жыл бұрын
i was expecting you to fix the height of card even the width. becouse generally those divs will be a list
@KevinPowell
@KevinPowell 6 жыл бұрын
When you say fix the height, you mean give them a fixed height?
@mujtabaiqbal4430
@mujtabaiqbal4430 5 жыл бұрын
Since its flex, shouldn't the image stretch all the way down automatically. Why have to give it a height?
@KevinPowell
@KevinPowell 5 жыл бұрын
The image isn't a flex item, it's parent is. Which might be a little redundant, but from the old way of doing things a little.
@mujtabaiqbal4430
@mujtabaiqbal4430 5 жыл бұрын
@@KevinPowell Ahhh got it. Thank you for clearing that up for me, Kevin!
@Victor_Marius
@Victor_Marius 3 жыл бұрын
line-height: 1.15 as default, I believe
@SunilSkanda
@SunilSkanda 4 жыл бұрын
What about negative margins?
@KevinPowell
@KevinPowell 4 жыл бұрын
I tend to try and avoid them as much as they can. They act the same way though, just in the opposite way. They "suck" things in, instead of pushing them away.
@labtec71
@labtec71 5 жыл бұрын
Why display: flex; does not working for me...
@KevinPowell
@KevinPowell 5 жыл бұрын
Hard to say without seeing more, or where it's being used
@labtec71
@labtec71 5 жыл бұрын
@@KevinPowell I found the prob Kevin, It was within the image container in the HTML. Thanks Dude.
@RishavPlayz2007
@RishavPlayz2007 3 жыл бұрын
Wow! I am the 999th like!
@ninjaaljun7674
@ninjaaljun7674 2 жыл бұрын
.
Using CSS Position Absolute: some practical examples
26:18
Kevin Powell
Рет қаралды 123 М.
Margin and Padding Deep Dive: The basics
13:04
Kevin Powell
Рет қаралды 73 М.
Perfect Pitch Challenge? Easy! 🎤😎| Free Fire Official
00:13
Garena Free Fire Global
Рет қаралды 93 МЛН
Haunted House 😰😨 LeoNata family #shorts
00:37
LeoNata Family
Рет қаралды 15 МЛН
Please stop using px for font-size.
15:18
Coder Coder
Рет қаралды 238 М.
Responsive design made easy
42:40
Kevin Powell
Рет қаралды 491 М.
Step up your CSS game using these selectors and combinators
19:41
Kevin Powell
Рет қаралды 182 М.
Learn CSS Grid the easy way
37:04
Kevin Powell
Рет қаралды 931 М.
How to make shapes with CSS
18:35
Kevin Powell
Рет қаралды 352 М.
HTTP Crash Course & Exploration
38:30
Traversy Media
Рет қаралды 1,1 МЛН
You can do that with margins?
14:40
Kevin Powell
Рет қаралды 188 М.
5 CSS mistakes that I see way too often
19:03
Kevin Powell
Рет қаралды 360 М.
min(), max(), and clamp() are CSS magic!
18:12
Kevin Powell
Рет қаралды 300 М.