Practice ยท 2 of 2
Images That Never Overflow
CHALLENGE
Difficulty: beginner+25 XP
Two declarations make images behave on every screen. Add to img: max-width: 100% (never wider than its container) and height: auto (keep proportions while shrinking).
Rules:
- Both declarations on a plain img element selector.
Press Submit to check your solution.
Back to lesson: Practice: Responsive Design โ Practice