CSS position deep dive
Channel: Kevin Powell
Date: 2023-11-14

https://kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=positioning 👈 Looking to up your CSS game? I have a bunch of courses, including several free ones.

With over 700 videos on YouTube that are almost all entirely about CSS, I’ve somehow never made one that looks at all the CSS position values! I’ve compared relative and absolute in the past and done a few looks at sticky, but I felt like one deep dive video would be a good idea.

There are a handful of videos like this one on YouTube already, but I find they try to cover the information as quickly as possible and don’t go into enough detail on things like how containing blocks work, and some of the small gotcha’s that you can run into. They also tend to use random floating boxes, so I tried to root this one into something a little more realistic.

🔗 Links
✅ Using position absolute in a responsive layout: https://youtu.be/H04P5YXVssE
✅ More on stacking contexts: https://youtu.be/uS8l4YRXbaw

⌚ Timestamps
00:00 - Introduction
01:10 - What we are starting with
01:40 - position: static
02:55 - position: relative
05:50 - position: absolute
13:47 - position: fixed
18:40 - position: sticky
24:20 - strange things that can break your positioning

#css

--

Come hang out with other dev's in my Discord Community
💬 https://discord.gg/nTYCvrK

Keep up to date with everything I'm up to
✉ https://www.kevinpowell.co/newsletter

Come hang out with me live every Monday on Twitch!
📺 https://www.twitch.tv/kevinpowellcss

---

Help support my channel
👨‍🎓 Get a course: https://www.kevinpowell.co/courses
👕 Buy a shirt: https://teespring.com/stores/making-the-internet-awesome
💖 Support me on Patreon: https://www.patreon.com/kevinpowell

---

My editor: VS Code - https://code.visualstudio.com/

---

I'm on some other places on the internet too!

If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.

Twitter: https://twitter.com/KevinJPowell
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell

---

And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!