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.

Oldest comments (53)

Collapse
 
callumreid profile image
callumreid

Oooh pretty text colors- could you share color scheme?

Collapse
 
whitep4nth3r profile image
@whitep4nth3r • Edited

If you're referring to the code examples, I think I used the Community Material High Contrast Light theme 😊

Collapse
 
callumreid profile image
callumreid

Thank you! That is exactly what I was referring to, I'm looking for a new light theme and it caught me eye

Collapse
 
lucecarter profile image
Luce Carter

In your journey learning CSS, what would you say has been your biggest lightbulb moment aside from the box model?

Collapse
 
whitep4nth3r profile image
@whitep4nth3r • Edited

CSS grid has changed the game. I recently discovered grid template areas — and gone are the days of sorting your HTML into rows and columns to mock grid layouts in your markup — just define your grid-areas on your individual elements and kind of visually construct your grid with some lines of CSS. It’s SO powerful and I don’t think people are talking about it enough. No more adding random inner containers to sort things and change the order of things throughout your CSS. Just define the layout of your grid in words in a line of CSS.

Collapse
 
deweyhammers profile image
Richard Dewey Hammers

This is SUPER helpfully. I had no idea there was Box-sizing

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

So happy to help, Richard!

Collapse
 
deweyhammers profile image
Richard Dewey Hammers

I'm using MUI to style my React project and I'm going to try to tricks you talked about to help with some of the funny things the css from MUI is pulling with the ui

Thread Thread
 
whitep4nth3r profile image
@whitep4nth3r

Good luck!

Collapse
 
elleon003 profile image
elleon003

This has really helped me better understand CSS box model - excellent presentation!

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Thank you! This makes me so happy! 🥳

Collapse
 
lucecarter profile image
Luce Carter

I need that table on a poster!

Collapse
 
devanshmehra profile image
Devansh Mehra • Edited

Always Declare Everything!!!

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

ALWAYS!!

Collapse
 
fizzybuzzybeezy profile image
fizzybuzzybeezy

Thanks for the deep info on the box model Salma!

aside:
I used to have to tell Opera 12 (long, long ago) to disguise itself to use the user agent for Internet Explorer because sites were written to the IE standard. At least I think I did, lol. It sounds familiar.

Great insight and tips. This should save some time and help with our layouts!

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Oof, that sounds tricky! Thanks for your kind words!

Collapse
 
callumreid profile image
callumreid

Do you prefer flexbox or grid? Any reason for the answer?

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

I use both flexbox and grid — both for different purposes! I always try to use grid for grid layouts (as the name suggests!) and I use flex on elements within the grid to lay things out nicely, vertically center things, and so on.

Collapse
 
ckn00b profile image
Christian New

On a team full of engineers that focus on functionality and using tools like bootstrap themes, there's one senior dev that specializes in front-end and then there's me that's been helping out. So many overlapping styles and confusion. Great tips and tricks @whitep4nth3r

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Thank you, Christian!

Collapse
 
alexandrammr profile image
\alexandrammr

Really loved it and the setup for the video was epic ❤️

Collapse
 
whitep4nth3r profile image
@whitep4nth3r

Thank you!

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!

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
 
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
 
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
 
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!