Solution: Adaptive Profile Card
Let’s build a responsive profile card using CSS Container Queries that adapts layout and typography across breakpoints while keeping a square avatar.
We'll cover the following...
We'll cover the following...
Problem description
Given a <div class="profile-card"> containing an <img class="avatar">, a <h3> for the username, and a <p> for the bio, write CSS so the card:
Displays vertically stacked (
avatar,heading, andparagraph) when its containerinline sizeis <250px.Displays horizontally (
avatarleft,textright) with0.875remh3...