Go to content

Fixing your layout headaches - Erik André Jakobsen - NDC Oslo 2023

Putting something where you want it to go is the most basic task in CSS—so it should be easy, right? With modern CSS, it often is. However, it also has a whole set of behaviors that can be puzzling: Why isn’t this button where I want it to be? Why can’t I place this card in front of the other one? And why am I digging through a hundred class names when I just wanted to nudge this card a little to the right? These pains can be alleviated by simply being told about two central concepts of CSS: The containing block, and the stacking context. With just 10 minutes of your time, you will understand what these are all about, and save yourself many layout headaches in the future. Check out our new channel: NDC Clips: @ndcclips Check out more of our featured speakers and talks at https://ndcconferences.com/ https://ndcoslo.com/

May 22, 2023