CodeNewbie Community 🌱

Cover image for [On-Demand Talk] This Box Will Change Your Life
@whitep4nth3r
@whitep4nth3r

Posted on

[On-Demand Talk] This Box Will Change Your Life

About This Talk

Is the struggle of battling with margins, paddings and layout in front end development all too familiar? Understanding the CSS box model will change your life. By exploring this powerful and fundamental concept through a series of code examples and real-world struggles, you'll feel empowered to tackle your next project with confidence. CSS doesn't have to be scary. This box will change your life.

Takeaways

  1. The CSS Box Model
  2. Box Sizing
  3. Different types of boxes

Resources

Slides

>> Click here to download slides

🌈 Comment below and ask me questions — I might just answer them during my live speaker discussion!


About Salma Alam-Naylor

Salma — or whitep4nth3r — helps developers build stuff, learn things and love what they do. With a background in music, teaching and comedy, and after a career as a front end developer and lead engineer, Salma is now a Developer Advocate at Contentful.

Salma is a Microsoft MVP for Developer Technologies, Twitch partner and live coding streamer, speaker, tech content creator, and relentless advocate for building a truly accessible web. Founder of unbreak.tech and womenwhostream.tech, her projects revolve around activism for social change and equality in the technology industry, and her expertise is the Jamstack and related front end web technologies.

Connect With Me


This on-demand talk is part of CodeLand 2021 — a virtual conference brought to you by CodeNewbie & DEV on September 23 & 24, 2021.

Latest comments (53)

Collapse
 
codemekathy profile image
Kathy Lambert

Great talk. Thanks for your all your great shared advice!

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Thank you, Kathy! So happy to help!

Collapse
 
towers1209 profile image
Loreto E. Torres

Q: Is there any place in the web where documentation about CSS features — like what you have done with boxes — can be found?

From the look of your slides, I could surmise that there has been a lot of work put into it (to make it look soo easy to comprehend).

Q: How much time did you put in your presentation for your allotted time?

Collapse
 
whitep4nth3r profile image
@whitep4nth3r • Edited

There is a wealth of information on MDN about all of the CSS specification: developer.mozilla.org/en-US/docs/W... — it can be rather wordy. So I would always recommend trying to put what you're reading into context and experiment with HTML and CSS with your own code to understand how it works.

I think I spent almost a week on writing the talk and building the demos and ensuring that the message was clear and not scary!

Collapse
 
towers1209 profile image
Loreto E. Torres

I’ve seen the mozilla docs and I don’t like ‘em.

To make the mozilla docs really good the way you did would be a “miracle” — i.e., without the proper intention, dedication, and most of all time-and-money budget.

You really did a good job for presenting the importance of that one box property.

Collapse
 
towers1209 profile image
Loreto E. Torres

Yes! A very honest remark that CSS is “easy”. Love it!!!!

Collapse
 
michaeltharrington profile image
Michael Tharrington

Heyo! If you have any questions for Salma (@whitep4nth3r ) please drop them here! 🙏

We're gathering up these questions for the live speaker discussion coming up later on. 📣

Collapse
 
noviicee profile image
Novice

Really informative. Great talk. Thanks Salma!

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Thank you, Novice!

Collapse
 
noviicee profile image
Novice

:D

Collapse
 
sunnynonsense profile image
SunnyNonsense

Thank you so much for your talk. When looking to create non-orthogonal designs or elements (e.g. diagonals, curves, etc.), is the box model able to achieve this or is there a totally different "model" that is used?

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

You'll be dealing with transforms and such to achieve those types of results — however — you'll still need to understand the box model and box sizing when working with those types of things in order to understand how margins, paddings, and borders will be affected. Remember — every HTML element rendered in the browser has a box model regardless.

Collapse
 
xelaflash profile image
AlexG

Probably the simplest but the best box model explication ever seen.
Kudos. Slides and snippets directly to my CSS cheatsheet.

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Thank you, Alex! Much appreciated!

Collapse
 
rizzydc profile image
Ruzel Zakirov

Thanks so much Salma! Very helpful tips, really improved my general understanding. I'm going to follow your advices and encouraged to dive deeper!

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Good luck in your CSS journey, Rizzy!

Collapse
 
debrakayelliott profile image
Debra-Kaye Elliott

I'll so be re-watching this talk. CSS still confuses me 😩.

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Keep practising... it's not easy! We're all here with you!

Collapse
 
debrakayelliott profile image
Debra-Kaye Elliott

Thanks for your encouragement! 🙏🏾

Collapse
 
serenalin121 profile image
Serena Lin

This is so helpfully! Thank you for sharing.

I want to know more about the difference between CSS Grid and Flexbox.

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Think of grid as defining a grid to work with. You can achieve grid layouts with flexbox, but with gris there are more possibilities. I use flex inside grid items much of the time.

Collapse
 
nadreamer profile image
Nad

This was the best explanation of the box model I've ever seen. Thank you!

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Thank you, Nad! This has made my day!

Collapse
 
niko1402 profile image
Nik Payton

Thank you Salma. You really explained the box system clearly, and it helped clear up some issues I was still having with CSS.

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Thank you so much, Nik!

Collapse
 
towers1209 profile image
Loreto E. Torres

Salma, That’s an amazing presentation of what could have been a very tedious topic presentation. 👍🏻

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Thank you so much, Loreto! I had a great time working on the talk.

Collapse
 
srivera12 profile image
Sarah Rivera

This was truly fantastic. I've spent far to long in my (fairly short so far) coding journey struggling with CSS and this was an incredibly helpful mindset-shift Thank you so much for your talk, and the resources you've shared!

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Thank you so much, Sarah!

Collapse
 
austinxduong profile image
austinxduong

ooooof im dusty on CSS after learning from this talk. This def changed my life, thank you Salma 🥳

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Happy to hear, Austin!