Learn CSS BOX MODEL - With Real World Examples

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ม.ค. 2025

ความคิดเห็น • 253

  • @pepitoalmonte1238
    @pepitoalmonte1238 10 หลายเดือนก่อน +130

    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 10 หลายเดือนก่อน +52

    This is the holy book of CSS Box models, thank you.

  • @official_bqpro
    @official_bqpro 8 หลายเดือนก่อน +52

    The Odin Project Brought me here. it was very clear and punctual on point.. Much love form 'South Africa'

  • @XMusicSickness
    @XMusicSickness 7 หลายเดือนก่อน +41

    Hot damn, this guy literally made me understand a concept i was having trouble with for a month in just 17 minutes...

  • @JimmyCrackorn
    @JimmyCrackorn 4 หลายเดือนก่อน +4

    Following your content has made my code the cleanest it's ever been since trying my hand at CSS. I started web development with HTML 23 years ago, and it was far different from how things are now. You give the most complete rundowns, and show a bunch of variations. I learned new things from you I couldn't find on my own because I didn't even know how to describe what I was looking for. Thanks to you, I know how these languages relate to each other.

  • @ride-time
    @ride-time ปีที่แล้ว +23

    That is by far the best explanation of the box model I've ever seen. Nice work!

  • @dragon_buster_10k
    @dragon_buster_10k 8 หลายเดือนก่อน +15

    Dude, you don't realize how much trouble I've had with resizing buttons, inputs, and other stuff and their true sizes being inconsistent. Thank you so much man!

  • @kopilkaiser8991
    @kopilkaiser8991 6 หลายเดือนก่อน +11

    Definitely, you are the best source to learn CSS simple and easy. You have made it absolutely simple to understand the logic of all these technologies

  • @Website_TV_1
    @Website_TV_1 4 หลายเดือนก่อน +2

    This video is a gem! The explanations of the CSS Box Model are super clear, and the real-world examples make it so much easier to understand. It's great to see a tutorial that breaks down complex concepts in such a simple way. Thank you for taking the time to explain margin, padding, border, and content in detail-this will definitely help me with my web development projects.

  • @AndyMorrisArt
    @AndyMorrisArt 3 หลายเดือนก่อน +2

    I appreciate how well you explain the details. I learned more in the last 17 minutes than I have in hours of watching other videos. I knew to use those resets but no-one ever explain exactly how they worked. Thanks.

  • @blakeclark8622
    @blakeclark8622 ปีที่แล้ว +4

    Thanks!

  • @jonaichi_09
    @jonaichi_09 2 หลายเดือนก่อน +2

    This is the simplest and best guide of the Box Model I've seen yet.
    Great job brother!

  • @internet_user_
    @internet_user_ 6 หลายเดือนก่อน +3

    No other video on this topic clicked with me until now. The way he explains it is just perfect and completely understandable. Other people make it sound like this concept came from another planet.

  • @sneaksneak6522
    @sneaksneak6522 ปีที่แล้ว +37

    You're such an incredible teacher, I will buy your course, thank you

    • @jayjaayjaaay94
      @jayjaayjaaay94 10 หลายเดือนก่อน

      can you give me the review of the course? I am consider to buying it as backend engineer who dislikes learn css 🥲

    • @sneaksneak6522
      @sneaksneak6522 10 หลายเดือนก่อน

      ​@@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

  • @alioe14
    @alioe14 4 หลายเดือนก่อน +2

    also came here from the Odin Project. You told the box model like explain it like i'm 5 years old. Thank you! You've explained it very clearly!

  • @taufiq6329
    @taufiq6329 9 หลายเดือนก่อน +2

    no one does it better than you my king😊😊

  • @shoebpatel4027
    @shoebpatel4027 4 หลายเดือนก่อน +2

    You are the best CSS tutor available on the youtube. Thanks!

  • @Budywieser
    @Budywieser ปีที่แล้ว +8

    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.

  • @brooklynsicily9145
    @brooklynsicily9145 7 หลายเดือนก่อน +2

    I learned more in this 8 minute video and another of your 2 minute videos then I did in 4 weeks of a online course. Good shit bro

  • @thegreater-1
    @thegreater-1 17 วันที่ผ่านมา +1

    this video is just top notch, you have a natural talent for explaining things in a way people can understand easily

  • @rileylavonne8863
    @rileylavonne8863 10 หลายเดือนก่อน +4

    Worth watching the whole thing. Speed it up if you want, but don't skip this one! Thanks!!!!!

  • @stefanfrunza8992
    @stefanfrunza8992 หลายเดือนก่อน +1

    This video was incredible, man. You truly made my Christmas better!

  • @DeanCohenOfficial
    @DeanCohenOfficial ปีที่แล้ว +2

    Best video I have seen about this topic.

  • @alawi096
    @alawi096 7 หลายเดือนก่อน +1

    Amazing tutorial, i have watched multiple videos and read multiple documents, but your tutorial is the only one that clicked with me. Thank you !

  • @johnmellet6610
    @johnmellet6610 ปีที่แล้ว +3

    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 ปีที่แล้ว

      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;
      }

  • @FernandaUnB
    @FernandaUnB 5 หลายเดือนก่อน +1

    this video solved all my questions, keep up with the channel men!

  • @user-11Il10I1
    @user-11Il10I1 หลายเดือนก่อน +2

    wow! hands down the best tutorial on this topic. thanks! subbed!

  • @magnumjade45
    @magnumjade45 8 หลายเดือนก่อน +2

    such a great teacher. im dumb af but you made me understand box model in 17 min. thank you so much.

  • @richardsinclair7661
    @richardsinclair7661 11 หลายเดือนก่อน +2

    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.

  • @imuhammadessa
    @imuhammadessa 8 หลายเดือนก่อน +1

    I was struggling to learn how box model work in css and why we use box-sizing property.
    I learned it well today, thank you so much for this ❤️

  • @RancorSweetly
    @RancorSweetly ปีที่แล้ว +3

    UNIVERSAL STAR SELECTOR 9:50 this is something I actually really needed but had no idea it existed. Thank you! 🙏🏼

  • @Dharmendrakewat123
    @Dharmendrakewat123 3 หลายเดือนก่อน +1

    One big css concept is cleared after long time thanks bro

  • @mykelcee
    @mykelcee ปีที่แล้ว +6

    Never fail to amaze me with your teaching skills.

  • @fase8729
    @fase8729 10 หลายเดือนก่อน +1

    I appreaciate your labor dude

  • @nitkarshchourasia2406
    @nitkarshchourasia2406 11 หลายเดือนก่อน

    🎯 Key Takeaways for quick navigation:
    00:00 📦 *CSS Box Model Overview*
    - Understanding the CSS Box Model.
    - Components of the Box Model: content, padding, border, and margin.
    - Importance of each component in defining the layout and spacing of elements.
    02:35 🛠️ *Implementing Box Model in CSS*
    - Practical demonstration of applying Box Model properties in CSS.
    - Using classes to style elements and manipulate their content, padding, border, and margin.
    - Live coding example with explanations of each step.
    08:25 🔄 *CSS Box Sizing: Content Box vs. Border Box*
    - Explaining the difference between content box and border box sizing.
    - Understanding how box sizing affects the calculation of element dimensions.
    - Advantages of using border box sizing for consistent and predictable layout behavior.
    12:44 📐 *Practical Application and Best Practices*
    - Applying border box sizing to ensure consistent element dimensions.
    - Best practices for setting box sizing in CSS, including using universal selectors.
    - Importance of box sizing reset for maintaining layout consistency across different elements.
    Made with HARPA AI

  • @HimanshuGupta-jx4nk
    @HimanshuGupta-jx4nk 7 หลายเดือนก่อน +1

    Thank you!!!! I missed this class and I have a javascript class in few hours. And I hadn't slept in 24 hours, I just needed to get this done and this video did it!

  • @BK69XXX
    @BK69XXX 7 หลายเดือนก่อน +1

    These vidoes are so addictive that i start having doubt about him adding crack in the concepts so that no one can skip a single video.

  • @poggers69-o3s
    @poggers69-o3s 10 หลายเดือนก่อน +1

    the way you teach is flawless :)

  • @ramune_flowers
    @ramune_flowers 10 หลายเดือนก่อน +1

    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!

  • @davisjustis3
    @davisjustis3 4 หลายเดือนก่อน +1

    Sometimes you just need that perfect video for you to truly understand a concept. This is that video for me.

  • @prasadranjansikdar6127
    @prasadranjansikdar6127 8 หลายเดือนก่อน +1

    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.

  • @rickyp9803
    @rickyp9803 ปีที่แล้ว +3

    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.

  • @Jazz-u5w
    @Jazz-u5w 4 หลายเดือนก่อน +1

    Really well explained. No confusing. Everything on point. Thanks ♥

  • @badcatdesign
    @badcatdesign ปีที่แล้ว +98

    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 ปีที่แล้ว +17

      😂 going clockwise works for me

    • @TheRetiredBatman
      @TheRetiredBatman ปีที่แล้ว

      HAHAHAHA

    • @rajatkatal9311
      @rajatkatal9311 11 หลายเดือนก่อน +3

      For Me clock is a good reference 😂

    • @francescoanastasio2021
      @francescoanastasio2021 7 หลายเดือนก่อน

      This is actually very useful 😂

    • @IShootMeme
      @IShootMeme 3 หลายเดือนก่อน +1

      Same here bruhhh😂😂😂

  • @mattnj8080
    @mattnj8080 ปีที่แล้ว +2

    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.

  • @tevfik7
    @tevfik7 8 หลายเดือนก่อน +1

    You are a great teacher bro. You have a new sub. Keep them coming.

  • @DnsError80710102
    @DnsError80710102 10 หลายเดือนก่อน +1

    Yes "we see" how helpful this explanation was no fluff thank you so much!

  • @RancorSweetly
    @RancorSweetly ปีที่แล้ว +4

    I didn't even realize I needed to know this thank you!! Great video start yeah! 🔥

  • @SuperDarmino
    @SuperDarmino ปีที่แล้ว +13

    i cant unhear Border-Box in Slay's voice 😭😭

  • @lunarskyye2680
    @lunarskyye2680 9 หลายเดือนก่อน +1

    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.

  • @yokk0
    @yokk0 ปีที่แล้ว +2

    love from brazil

  • @liliies081
    @liliies081 2 หลายเดือนก่อน +1

    Thank you! I never understood why the universal * properties thing and the box-sizing but this video made it very clear. I am probably gonna forget it but good thing i can come back to this video anytime and learn it again.

  • @MuhammadNafizAlRakib
    @MuhammadNafizAlRakib ปีที่แล้ว +2

    web legend is back with a fire video. 😅 You are awesome brother

  • @00SecretAgent
    @00SecretAgent ปีที่แล้ว +1

    @SlayingTheDragon
    ...
    Finally, someone I can hear, understand, and follow all in one box..!

  • @hiarafatYT
    @hiarafatYT ปีที่แล้ว +3

    You explained it really well. Thank you so much.

  • @kieran2347
    @kieran2347 หลายเดือนก่อน +1

    Great video and the details given are clear and concise! Amazing

  • @fazalmahmud2050
    @fazalmahmud2050 6 หลายเดือนก่อน +1

    Every second is worth watching. Thank you.

  • @TheGuyCalledCarl
    @TheGuyCalledCarl 7 หลายเดือนก่อน +1

    Damn! I thought I understood "box-sizing: border-box", but I actually didn't.
    Now I understand it.
    Awesome explanation... Thanks!

  • @sammclaren6965
    @sammclaren6965 5 หลายเดือนก่อน +1

    You nailed it! Keep up the good work!

  • @habeebabdullahi429
    @habeebabdullahi429 4 หลายเดือนก่อน +1

    I love this content a lot, I found this video tutorial from The Odin Project. I'd love to see more of your content on CSS. Much love from Nigeria. 🤩🤩

  • @fiendgamingyt8938
    @fiendgamingyt8938 2 หลายเดือนก่อน +2

    Finally I got it.
    Thanks a lot amazing explanation 🔥🔥

  • @Earthsings
    @Earthsings 5 หลายเดือนก่อน +1

    This video was excellent! Definitely subscribing!

  • @krishnaalisetty4505
    @krishnaalisetty4505 หลายเดือนก่อน +1

    Glad that i found this video. Thank you so much for such a good content.

  • @daniajahanzaib5626
    @daniajahanzaib5626 ปีที่แล้ว +2

    really nice way of explaining CSS. Easy to remember

  • @ciecjames8571
    @ciecjames8571 5 หลายเดือนก่อน

    Thanks you save me time I used to test the padding manually to find out the top,bottom,right,left

  • @alexanderv805
    @alexanderv805 หลายเดือนก่อน

    Excellent tutorial! Clear and straightforward. Thanks!

  • @musicbutlyrical6380
    @musicbutlyrical6380 11 หลายเดือนก่อน +1

    You really are the best one on this platform....Great Work!!

  • @dramamania6899
    @dramamania6899 ปีที่แล้ว +2

    Your teaching skills is just amazing ❤. I learnt many things from you. Thank you bro ❤

  • @sureshkumar3217
    @sureshkumar3217 ปีที่แล้ว +2

    I am doing css and I love this video

  • @Lucas-q7r8y
    @Lucas-q7r8y หลายเดือนก่อน +1

    Thanks for this video, appreciate your efford.
    Well explained!

  • @SirenSeph
    @SirenSeph 8 หลายเดือนก่อน +1

    greatest explanation of CSS Box Models tysm ily

  • @rupertodiaz8673
    @rupertodiaz8673 หลายเดือนก่อน +1

    Best explanation ever ! thanks Smaug

  • @ShawnX1995
    @ShawnX1995 8 หลายเดือนก่อน +1

    very detailed and simple examples. I appreciate you for creating that content.♥♥

  • @Lian-zb5rk
    @Lian-zb5rk ปีที่แล้ว +2

    i have stumbled upon a gold mine of content

  • @Coolbinarystuff
    @Coolbinarystuff 9 หลายเดือนก่อน +1

    Awesome stuff, explained very well like all the rest of your content.

  • @isurumaldeniya9536
    @isurumaldeniya9536 7 หลายเดือนก่อน +1

    just bought the course really great content bro 😊😊👍👍

  • @marabdiaziiz961
    @marabdiaziiz961 ปีที่แล้ว +2

    i really enjoyed the video thanks man

  • @jahnisicalderon5600
    @jahnisicalderon5600 7 หลายเดือนก่อน +1

    I loved the explanation. I understood it so well thanks

  • @NiceChange
    @NiceChange ปีที่แล้ว +2

    Yup...Another great video. nice details. Thanks.

  • @Dungeon_Synth_Enjoyer
    @Dungeon_Synth_Enjoyer ปีที่แล้ว +2

    Yep, you are a very good teacher, thanks a lot.

  • @lexxthetech_
    @lexxthetech_ 10 หลายเดือนก่อน +1

    you just saved my life. THANK YOU.

  • @shobuj_pata
    @shobuj_pata 4 หลายเดือนก่อน +1

    I was fascinated by the explanation of the box-sizing: border-box; part! I really didn't know what the purpose of this element is until now when I saw your explanation!
    I was having a lot of trouble measuring my text and content inside the div container (box) but nothing was taking action according to my desire, because guess what, all this time my whole style sheet was measured according to the box-sizing: border-box; element. At that time, I really didn't know what its purpose was.
    Now that I got to learn from your video of the actual purpose of this element, my problem is solved, and I am able to measure my div container (box) as I desire to be.

  • @georgeomondi4791
    @georgeomondi4791 6 หลายเดือนก่อน +1

    thanks dude been doing coding for a while and never bothered even to know the meaning of box-sizing 🤣till now

  • @BuildingBeautyWithin
    @BuildingBeautyWithin 8 หลายเดือนก่อน +1

    Your video is liquid gold:) Thank you🙏

  • @ARULVENDHAN-up8fq
    @ARULVENDHAN-up8fq 8 หลายเดือนก่อน +1

    Extraordinary teaching ❤

  • @TheRoyalLion
    @TheRoyalLion 3 หลายเดือนก่อน +2

    YOO, Thank you so much!

  • @Jishanthegodev
    @Jishanthegodev ปีที่แล้ว +2

    Thank you so much for this amazing video, ❤ everything is clear now

  • @vivekpoojary265
    @vivekpoojary265 7 หลายเดือนก่อน +1

    good job, very useful content , thank you so much

  • @kriegerm.5048
    @kriegerm.5048 2 หลายเดือนก่อน +1

    Explains better than any professor 😮

  • @edmilsondossantosgaldino8615
    @edmilsondossantosgaldino8615 7 หลายเดือนก่อน +1

    great explanation

  • @Sebastian-lc4nh
    @Sebastian-lc4nh ปีที่แล้ว +4

    Love youuu from my inner soul❤

  • @DevALWaleed
    @DevALWaleed 5 หลายเดือนก่อน +1

    Got a like and new subscriber. Thank you so much!

  • @Varuns36
    @Varuns36 ปีที่แล้ว +2

    Here comes the legend, to slay the dragon CSS

  • @Betterdays1996
    @Betterdays1996 7 หลายเดือนก่อน +1

    Thank you so much for this one 💖

  • @JonathanMudgett
    @JonathanMudgett 6 หลายเดือนก่อน

    Here from Odin Project, awesome watch this helped me a lot

  • @rejuzaman6365
    @rejuzaman6365 ปีที่แล้ว +2

    You're a legend❤

  • @Blackdiamond929_
    @Blackdiamond929_ 7 หลายเดือนก่อน +1

    your videos are so helpful :) thank you!

  • @Chiaros
    @Chiaros ปีที่แล้ว +6

    Adding sections to the video's timeline would be nice, like in older videos.

  • @rakeshislammolla7201
    @rakeshislammolla7201 11 หลายเดือนก่อน +1

    You are creating great content ❤

  • @gabrielrinconlopez9241
    @gabrielrinconlopez9241 ปีที่แล้ว +2

    Thanks a lot for the class ;).