Learn CSS BOX MODEL - With Real World Examples

  Рет қаралды 74,436

Slaying The Dragon

Slaying The Dragon

6 ай бұрын

🚨🚨🚨 COURSES - slayingthedragon.io 🚨🚨🚨
Join the discord - / discord
On the web, everything is a box, literally everything. All the elements, the images, the videos, the paragraphs, the headings, entire sections, everything! And with everything being a box, everything has this box-model applied to it. We see, the box model consists of the content, the padding, the border, and the margin.

Пікірлер: 156
@pepitoalmonte1238
@pepitoalmonte1238 2 ай бұрын
Jesus bro, everyone is focusing on making short videos without details, but this 17 min long is worth every second. thanks so much.
@niinjablade9369
@niinjablade9369 Ай бұрын
This is the holy book of CSS Box models, thank you.
@magnumjade45
@magnumjade45 15 күн бұрын
such a great teacher. im dumb af but you made me understand box model in 17 min. thank you so much.
@badcatdesign
@badcatdesign 6 ай бұрын
I use the mnemonic of “TRouBLe” to remember the order of Top Right Bottom Left. Keeps me out of TRBL 😂 Thanks for the video.
@olufemiajibade
@olufemiajibade 5 ай бұрын
😂 going clockwise works for me
@christopherkallas9305
@christopherkallas9305 3 ай бұрын
HAHAHAHA
@rajatkatal9311
@rajatkatal9311 3 ай бұрын
For Me clock is a good reference 😂
@sneaksneak6522
@sneaksneak6522 6 ай бұрын
You're such an incredible teacher, I will buy your course, thank you
@jayjaayjaaay94
@jayjaayjaaay94 2 ай бұрын
can you give me the review of the course? I am consider to buying it as backend engineer who dislikes learn css 🥲
@sneaksneak6522
@sneaksneak6522 2 ай бұрын
​@@jayjaayjaaay94 I really enjoyed it. If you like his teaching style here on youtube, you will enjoy the course. It doesn't teach you absolutely everything, but in my case it took me from not understanding CSS and hacking my way through it, to being confident enough to use it with little effort
@ride-time
@ride-time 4 ай бұрын
That is by far the best explanation of the box model I've ever seen. Nice work!
@rb2k197
@rb2k197 4 ай бұрын
Wow you explained this a lot better, I am doing some online boot camp and i get confused by this margin, padding, and elements and you help me understand it.
@SuperDarmino
@SuperDarmino 6 ай бұрын
i cant unhear Border-Box in Slay's voice 😭😭
@mattnj8080
@mattnj8080 3 ай бұрын
Your videos are great. I love the tips that go beyond just showing how it works. This is the first time I've heard of border-box which helped me a lot as I was always doing math before and layouts were confusing.
@richardsinclair7661
@richardsinclair7661 3 ай бұрын
Thank you so much. You've been the best that I've found at explaining CSS in a way that is both clear and straightforward.
@rickyp9803
@rickyp9803 5 ай бұрын
Excellent, excellent, excellent, explanation. Thank you very much, you've made clear a whole bunch of things that I as a beginner studying web development, have been trying to figure out and no other video was able to explain it as you do in this one. For example, what does the box and it's sections in the developers tools mean, as well as how to use and understand the box model in the developer tools. You have given me a clear understanding of that tool. Again, muchísimas gracias.
@RancorSweetly
@RancorSweetly 6 ай бұрын
I didn't even realize I needed to know this thank you!! Great video start yeah! 🔥
@johnmellet6610
@johnmellet6610 5 ай бұрын
Thank you so much genuinely I am busy building my first survey form and i thought i kind of understood padding and margin but this video has completely changed everything for me with css! I was really struggling picked up html strait away and i can style with css, i have only been learning a week but this has broken it all down and elaborated on all the elements thank you so much!!
@johnmellet6610
@johnmellet6610 5 ай бұрын
tell you what here is my current html and css code so you can take a look and when I finish it you can see how much you have helped xD HTML Survey Template Project Template Survey Form [Insert text here] Enter your first name: Enter your last name: Enter your email: Enter your number: Select option: (Please select) Option 1 Option 2 Option 3 Option 4 Please select one (required) Yes! No! What would you like to see improved?(Check all that apply) Selection 1 Selection 2 Selection 3 Selection 4 Selection 5 Selection 6 Selection 7 Additional information Any additional info: Add am image: This page was created by John Mellet If you would like to see more projects of mine click Here © 2023 Example Company. All rights reserved. css body { width: 100%; height: 100vh; } .br { background-image: url('stock.img'); height: 100%; background-position: center; background-repeat: no-repeat; background-size: cover; } h1, p { margin: 1em auto; text-align: center; font-family: Helvetica; } form { width: 60vw; max-width: 1200px; min-width: 300px; margin: 0 auto; font-family: sans-serif; font-size: 16px; color: #e7e1db; background: rgb(0,0,0); background: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(5,4,75,1) 16%, rgba(41,11,190,1) 52%, rgba(0,0,0,1) 95%); } fieldset { border: none; padding: 2rem 0; border-bottom: 5px solid; } label { display: block; margin: 0.5rem 0; } footer { color: whitesmoke; font-family: Times New Roman, Times; }
@kmarafatislam8403
@kmarafatislam8403 4 ай бұрын
You explained it really well. Thank you so much.
@rileylavonne8863
@rileylavonne8863 2 ай бұрын
Worth watching the whole thing. Speed it up if you want, but don't skip this one! Thanks!!!!!
@PainRemains2024
@PainRemains2024 23 күн бұрын
You helped me out so much! Thank you for making quality content.
@mykelcee
@mykelcee 5 ай бұрын
Never fail to amaze me with your teaching skills.
@DnsError80710102
@DnsError80710102 Ай бұрын
Yes "we see" how helpful this explanation was no fluff thank you so much!
@prasadranjansikdar6127
@prasadranjansikdar6127 14 күн бұрын
You really explained it so simply.. Thanks for the lessons it really means a lot for the ones similar like me who are struggling to understand and implement.
@RancorSweetly
@RancorSweetly 6 ай бұрын
UNIVERSAL STAR SELECTOR 9:50 this is something I actually really needed but had no idea it existed. Thank you! 🙏🏼
@Yesterday_i_ate_rat
@Yesterday_i_ate_rat 6 ай бұрын
Thank you so much for this amazing video, ❤ everything is clear now
@DeanCohenOfficial
@DeanCohenOfficial 5 ай бұрын
Best video I have seen about this topic.
@dramamania6899
@dramamania6899 5 ай бұрын
Your teaching skills is just amazing ❤. I learnt many things from you. Thank you bro ❤
@clueless1434
@clueless1434 24 күн бұрын
Awesome stuff, explained very well like all the rest of your content.
@SirenSeph
@SirenSeph 2 күн бұрын
greatest explanation of CSS Box Models tysm ily
@ShawnX1995
@ShawnX1995 10 күн бұрын
very detailed and simple examples. I appreciate you for creating that content.♥♥
@flp905
@flp905 Ай бұрын
the way you teach is flawless :)
@musicbutlyrical6380
@musicbutlyrical6380 2 ай бұрын
You really are the best one on this platform....Great Work!!
@lunarskyye2680
@lunarskyye2680 27 күн бұрын
Wow. Now this is a cracking tutorial. I understood everything until the 2nd reset you did with pseudos. Maybe because I haven't looked at before and after yet. Brilliant tutorial.
@marabdiaziiz961
@marabdiaziiz961 6 ай бұрын
i really enjoyed the video thanks man
@fase8729
@fase8729 Ай бұрын
I appreaciate your labor dude
@jha-bhaskar
@jha-bhaskar 2 ай бұрын
Great Explanation ❤
@charlestoneoyoo
@charlestoneoyoo 3 ай бұрын
Thank you for this explanation
@daniajahanzaib5626
@daniajahanzaib5626 5 ай бұрын
really nice way of explaining CSS. Easy to remember
@00SecretAgent
@00SecretAgent 3 ай бұрын
@SlayingTheDragon ... Finally, someone I can hear, understand, and follow all in one box..!
@lexxthetech_
@lexxthetech_ 2 ай бұрын
you just saved my life. THANK YOU.
@ramune_flowers
@ramune_flowers Ай бұрын
Just learned about this in my course and was getting so confused by the explanation. Thanks for keeping it short and concise, it's actually not that hard!
@hoagiesupreme
@hoagiesupreme 20 күн бұрын
I hope you get rich one day teaching stuff. You're great at it.
@dannygarcia8012
@dannygarcia8012 2 ай бұрын
Very informative, thanks! 👍
@chrisbartkowski375
@chrisbartkowski375 3 ай бұрын
thanks man, very helpful, very clear.
@varswe
@varswe 6 ай бұрын
Here comes the legend, to slay the dragon CSS
@Dungeon_Synth_Enjoyer
@Dungeon_Synth_Enjoyer 6 ай бұрын
Yep, you are a very good teacher, thanks a lot.
@gabrielrinconlopez9241
@gabrielrinconlopez9241 6 ай бұрын
Thanks a lot for the class ;).
@rakeshislammolla7201
@rakeshislammolla7201 2 ай бұрын
You are creating great content ❤
@NiceChange
@NiceChange 5 ай бұрын
Yup...Another great video. nice details. Thanks.
@uridevmedia
@uridevmedia 2 ай бұрын
This is very descriptive thanks ✌🏼
@NAFIZALRAKIB
@NAFIZALRAKIB 6 ай бұрын
web legend is back with a fire video. 😅 You are awesome brother
@Chiaros
@Chiaros 6 ай бұрын
Adding sections to the video's timeline would be nice, like in older videos.
@miikoa
@miikoa 10 күн бұрын
Your video is liquid gold:) Thank you🙏
@riyadhossain7854
@riyadhossain7854 6 ай бұрын
Love your videos bro! Could you make a video about the Git commands you use and why you use them in what situations?
@FallenAngelMMA
@FallenAngelMMA 6 ай бұрын
Thank you so much!
@Lian-zb5rk
@Lian-zb5rk 6 ай бұрын
i have stumbled upon a gold mine of content
@yokk0
@yokk0 6 ай бұрын
love from brazil
@rtx__3090
@rtx__3090 6 ай бұрын
Clockwise was nice concept
@rejuzaman6365
@rejuzaman6365 5 ай бұрын
You're a legend❤
@rakibul98
@rakibul98 4 ай бұрын
explained very well
@sureshkumar3217
@sureshkumar3217 5 ай бұрын
I am doing css and I love this video
@manuelk64
@manuelk64 3 ай бұрын
this video is sponsored by... myself! 😀
@Sebastian-lc4nh
@Sebastian-lc4nh 6 ай бұрын
Love youuu from my inner soul❤
@pushyanth1223
@pushyanth1223 2 ай бұрын
super explanation kudos to you
@KarthikKollur-ky3iw
@KarthikKollur-ky3iw 5 ай бұрын
thank u so much man
@xonic7852
@xonic7852 6 күн бұрын
Extremely nice video!
@undeadqug7732
@undeadqug7732 29 күн бұрын
bro you are the GOAT
@rahulrahul6259
@rahulrahul6259 2 ай бұрын
Wow , Thanks a lot it covered many things which I don't know ❤❤❤
@taufiq6329
@taufiq6329 Ай бұрын
no one does it better than you my king😊😊
@PraveenKumarJha-xc6ie
@PraveenKumarJha-xc6ie 3 күн бұрын
nice video sir.i appreciate your efforts to make us understand the best
@its_mah_way2717
@its_mah_way2717 2 ай бұрын
Hello sir, thank you so much for this amazing tutorial, looking forward to more such amazing content... Best regards 😃
@menachemlevi
@menachemlevi 5 ай бұрын
love you from israel and you have a really calm voice
@shangeevanMukunthan
@shangeevanMukunthan 26 күн бұрын
Thank you brother
@menachemlevi
@menachemlevi 5 ай бұрын
just subscribe well explained
@Macj707
@Macj707 2 ай бұрын
Great Video... I am going to share it... that is good that you can use * to remove the margin I didnt know that! CHEF CRISP WUZ HERE!
@altayeb913
@altayeb913 5 ай бұрын
Really really well explained, can the next topic (if and hopefully there will be) be about {border-image, conic gradient} and some not very beginner-ish topics.
@rajbhushan3541
@rajbhushan3541 14 сағат бұрын
perfection
@c28ccd0e
@c28ccd0e 5 ай бұрын
Everything is smooth now after doing the CSS reset !
@chenbruce2428
@chenbruce2428 4 күн бұрын
learn a lot thanks
@sharath.m
@sharath.m 6 ай бұрын
Can you make a video on margin collapse property
@ahmedghallab5342
@ahmedghallab5342 3 ай бұрын
شكرا Thanks that was helpful
@blakeclark8622
@blakeclark8622 6 ай бұрын
Thanks!
@slayingthedragon
@slayingthedragon 6 ай бұрын
Thank very much !!
@basmalabasmala7176
@basmalabasmala7176 2 ай бұрын
the best one eveeeeeeeeeeeeeeeeeer
@trocandobytes
@trocandobytes Күн бұрын
Your videos are very concise and helpful ! I was wondering if you could make tutorials on how to make complete website layouts, with different templates covering the most used ones. You could make use of flex or grid to make they adapt nicely on any divice, depending of the layout, and using the correct semantics. Could you ?
@rejoiceokafor5988
@rejoiceokafor5988 2 ай бұрын
You're good❤🔥
24 күн бұрын
I LOVE YOU!!!!!!!!!!!!!!
@halcyon__r3289
@halcyon__r3289 6 ай бұрын
Didnt know about the default margin
@kenanklovitch8117
@kenanklovitch8117 3 ай бұрын
Wow, I am barely above a novice but I understood that (I think). Thank you.
@dorthychristobel5106
@dorthychristobel5106 Ай бұрын
Thank you🥹
@Bingbangbong28
@Bingbangbong28 6 ай бұрын
awesome
@SRG-Learn-Code
@SRG-Learn-Code 6 ай бұрын
In your webpage, the javascript course overflows the element within the 1024px media query. Seems like the grid is forced too much . @media (min-width: 1024px) .Courses_item2__LS7ps { grid-area: 1/5/3/-1; }
@thatoneshortkidjordy2144
@thatoneshortkidjordy2144 6 ай бұрын
fire video 😎
@slayingthedragon
@slayingthedragon 6 ай бұрын
😎😎
@flashingturtle6505
@flashingturtle6505 Ай бұрын
Bravo sir
@fatemeetsluck
@fatemeetsluck 19 күн бұрын
This was extremely helpful. I'm trying to make a sort of Bible study note HTML app sort of thing that can display the text on one side and the annotations on the right, all without using deprecated HTML elements such as "frame".
@PascalHorn
@PascalHorn 6 ай бұрын
I can see a star selector to reset padding and margin, but I have my doubts about resetting box-sizing to all elements. The problem occurs, when you insert widgets or other code from a third party, that uses padding without specifying a border-box. It can break their intended box model for their widgets. An at least not uncommon occurrence I have to fix from time to time. I’d use it with caution.
@slayingthedragon
@slayingthedragon 6 ай бұрын
This is valid honestly, well said.
@Halonyr
@Halonyr 6 ай бұрын
For situations like this, you can simply see if it breaks, and then override the border-box with your content-box instead. These resets save you time 95% of the time, and I think is a reasonable reset to keep for all projects.
@dixalex02
@dixalex02 2 ай бұрын
Great explanation. Learned something new with the box-model and you're right, based on its powerful functionality is should be applied to the entire DOM. What is the compatibility of this? IE7 (I'm showing my age)?
@slayingthedragon
@slayingthedragon 2 ай бұрын
Thank you! Here's the browser support, it's overwhelmingly supported, only IE6 and 7 aren't caniuse.com/?search=border-box
@Basem71992
@Basem71992 4 ай бұрын
For those who don’t understand the video from the first time of watching it , do rewatch it and practice what is he doing in your workspace. Man , thank you so much , you really helped me to understand this very well .
@putudharma4352
@putudharma4352 6 ай бұрын
1st here :) waiting for your content for a while
@BibekGotame
@BibekGotame 3 ай бұрын
Post some video myan. Eagerly waiting for
@user-cj3cl3bu4r
@user-cj3cl3bu4r 5 ай бұрын
You're good
@BigBadBelgium9803
@BigBadBelgium9803 4 ай бұрын
Hey man, wasn't sure where to ask this so resorting to this responce section. Would you by any chance know why this 'display: flex; " css code wouldn't work for Microsoft edge browser on a sharepoint page? I've copied your code 100% correct and the tiles in my container stay vertically. If i run the code at home on a firefox browser it works perfectly. So its either the edge browser at work or the fact i am using this type of code inside a sharepoint enviroment. Thx for your help.
@David-cz9ej
@David-cz9ej 4 ай бұрын
Thank you very much for the Video :D One question: At 17:02 why not move the margin: 0; and the padding: 0; to the upper *, *::before, *:after selector? Why have you left a separate * selector?
@slayingthedragon
@slayingthedragon 4 ай бұрын
It is perfectly fine to do so, however there is no margin nor padding to be reset within the contexts of a before or after pseudo-element, whereas there is a box-sizing to be reset. Having both resets separated is somewhat more semantic, because like I said, within the contexts of a before or after pseudo-element, there is no margin and padding.
@David-cz9ej
@David-cz9ej 4 ай бұрын
@@slayingthedragon Thank you for replying to all the questions! It means the world to us ♥️
@user-mg8lr6cg1z
@user-mg8lr6cg1z 5 ай бұрын
best
@bigisma-il5927
@bigisma-il5927 2 ай бұрын
He's good
Learn CSS Variables In 7 Minutes
7:20
Slaying The Dragon
Рет қаралды 26 М.
How to ACTUALLY Master CSS?
11:51
Mehul - Codedamn
Рет қаралды 66 М.
didn't want to let me in #tiktok
00:20
Анастасия Тарасова
Рет қаралды 8 МЛН
小路飞第二集:小路飞很听话#海贼王  #路飞
00:48
路飞与唐舞桐
Рет қаралды 19 МЛН
Зу-зу Күлпәш. Стоп. (1-бөлім)
52:33
ASTANATV Movie
Рет қаралды 736 М.
How did CatNap end up in Luca cartoon?🙀
00:16
LOL
Рет қаралды 5 МЛН
How to create Draggable Slider Tabs || HTML, CSS, and JavaScript
22:27
Project Code with AJ
Рет қаралды 285
Learn CSS Positioning Quickly With A Real World Example
8:32
Slaying The Dragon
Рет қаралды 550 М.
Incredible scroll-based animations with CSS-only
32:23
Kevin Powell
Рет қаралды 318 М.
How to Properly Layout A Website (For Beginners)
14:50
The Website Architect
Рет қаралды 475 М.
Every CSS Animation property
9:26
chunkydotdev
Рет қаралды 44 М.
Learn CSS flexbox in 10 minutes! 💪
10:01
Bro Code
Рет қаралды 97 М.
Use these instead of vh
6:06
Kevin Powell
Рет қаралды 435 М.
NEW GPT-4o: My Mind is Blown.
6:28
Joshua Chang
Рет қаралды 15 М.
Learn CSS Subgrid in 14 minutes
14:19
Slaying The Dragon
Рет қаралды 28 М.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 876 М.
The PA042 SAMSUNG S24 Ultra phone cage turns your phone into a pro camera!
0:24