Freddy Montes

Costa Rica (GMT-6)

Frontend Developer with a graphic design degree. UX/UI and Javascript crafter. More

Responsive components tips

August 27, 2019

This post was originally posted on my Instagram account.

Responsive components tips

One of the main problems I keep seeing in web development is that when they code elements in a page always use pixels for the dimensions and that was ok a few years ago when the idea it was to code pixel-perfect websites but today is all about responsive:

1️⃣ Avoid px or any absolute css unit

2️⃣ Use %, vw and vh instead

3️⃣ Make the element adjust its content

4️⃣ Use Flexbox

5️⃣ You can define how much an element it should grow or shirk with min-width and max-width

❤️ Follow me for more content in @fmontes.

© 2020, Built with pure 🔥 and Gatsby