Relative Positioning 202

A Guide to Placing Things in the Right Spot

You've got a layout to build, but you're not sure where to start? Don't worry, we've got you covered! Relative positioning is like building with LEGO bricks, but instead of plastic bricks, you're using... well, not-plastic-bricks.

Here are a few tips to help you position your elements with style:

1. The Absolute Positioning Method

This is where you use the position: absolute property, but let's be real, who does that?

Learn more about floating-point jokes

2. The Flexbox Method

This is where you use display: flex to position your elements with ease, but not too much ease, because that's just not how we roll.

Read the Flexbox FAQ See the Flexbox Failures