My profile picture. My mom says I'm a handsome boy!
← All Posts

Extending Background Color with Box Shadow


I haven't written anything this year so I figured I'd post a quick tip while I still have some time. I've been busy rewriting this website in React which should be launching soon!

If you ever have a parent element with a padding value and a child element with a background-color you'd like to extend into the parent's padding box, you can use box-shadow to achieve the effect, as detailed below.