Kevin Powell | How to escape the container on only one side @KevinPowell | Uploaded August 2023 | Updated October 2024, 5 hours ago.
π If youβve been writing CSS for awhile now but youβre having trouble making that next step up with is, you might be interested in my course CSS Demystified: kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=full-width-one-side
Having something be full-width on a website isn't hard, and there are even some neat tricks to break out of a container for a full-width section of a site, but what about when you only want one side to go all the way to the edge?
There are simpler ways to set this up, but in this video I look at how I like to do it because itβs incredibly versatile, and also gives us a good chance to learn more about custom properties, logical properties, grid, positioning, and more π.
π Links
β Finished code: codepen.io/kevinpowell/pen/ZEmgQvV
β CSS Demystified: https://cssdemystified.com?utm_campaign=general&utm_source=youtube&utm_medium=full-width-one-side
β My other courses: kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=full-width-one-side
β My Grid videos: youtube.com/playlist?list=PL4-IK0AVhVjM41-Ezm5tmESVchNEi7aZU
β More on logical properties: youtu.be/kzvmaVik4mA
β How I place my cursor in multiple places at once: youtu.be/9M58urr1CVQ
β Timestamps
00:00 - Introduction
01:30 - The basic setup for small screens
04:45 - Basic setup for larger screens
10:35 - Fixing the placement of content on larger screens
13:25 - Making the background take up the full width
16:37 - Making it work if the text is before the image
20:00 - Fixing the vertical spacing
22:50 - CSS Demystified
23:15 - Fixing the alignment with the wrapper
24:25 - Fixing the inner spacing
26:48 - Fixing the images
#css
--
Come hang out with other dev's in my Discord Community
π¬ discord.gg/nTYCvrK
Keep up to date with everything I'm up to
β kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
πΊ twitch.tv/kevinpowellcss
---
Help support my channel
π¨βπ Get a course: kevinpowell.co/courses
π Buy a shirt: teespring.com/stores/making-the-internet-awesome
π Support me on Patreon: patreon.com/kevinpowell
---
My editor: VS Code - 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: twitter.com/KevinJPowell
Codepen: codepen.io/kevinpowell
Github: 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!
π If youβve been writing CSS for awhile now but youβre having trouble making that next step up with is, you might be interested in my course CSS Demystified: kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=full-width-one-side
Having something be full-width on a website isn't hard, and there are even some neat tricks to break out of a container for a full-width section of a site, but what about when you only want one side to go all the way to the edge?
There are simpler ways to set this up, but in this video I look at how I like to do it because itβs incredibly versatile, and also gives us a good chance to learn more about custom properties, logical properties, grid, positioning, and more π.
π Links
β Finished code: codepen.io/kevinpowell/pen/ZEmgQvV
β CSS Demystified: https://cssdemystified.com?utm_campaign=general&utm_source=youtube&utm_medium=full-width-one-side
β My other courses: kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=full-width-one-side
β My Grid videos: youtube.com/playlist?list=PL4-IK0AVhVjM41-Ezm5tmESVchNEi7aZU
β More on logical properties: youtu.be/kzvmaVik4mA
β How I place my cursor in multiple places at once: youtu.be/9M58urr1CVQ
β Timestamps
00:00 - Introduction
01:30 - The basic setup for small screens
04:45 - Basic setup for larger screens
10:35 - Fixing the placement of content on larger screens
13:25 - Making the background take up the full width
16:37 - Making it work if the text is before the image
20:00 - Fixing the vertical spacing
22:50 - CSS Demystified
23:15 - Fixing the alignment with the wrapper
24:25 - Fixing the inner spacing
26:48 - Fixing the images
#css
--
Come hang out with other dev's in my Discord Community
π¬ discord.gg/nTYCvrK
Keep up to date with everything I'm up to
β kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
πΊ twitch.tv/kevinpowellcss
---
Help support my channel
π¨βπ Get a course: kevinpowell.co/courses
π Buy a shirt: teespring.com/stores/making-the-internet-awesome
π Support me on Patreon: patreon.com/kevinpowell
---
My editor: VS Code - 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: twitter.com/KevinJPowell
Codepen: codepen.io/kevinpowell
Github: 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!