The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Control Image Aspect Ratio Using CSS

Control Image Aspect Ratio Using CSS

2:14
Resize images and videos to fill their parent and maintain their aspect ratio with pure CSS. The new `object-fit` and `object-position` properties allow you to scale images and videos, much like you could with `background-size` and `background-position`.
Watch this lesson now
Avatar
egghead.io

Resize images and videos to fill their parent and maintain their aspect ratio with pure CSS. The new object-fit and object-position properties allow you to scale images and videos, much like you could with background-size and background-position.

Avatar
Aimn

Why is this course too short. PLEEEEASE keep going. I can stay awake for a whole month listening to you.

Avatar
engine2

I'm missing note about that this feature: 'object-fill' is still not supported by Microsoft's browsers. MS Edge status: In Development. http://caniuse.com/#feat=object-fit

Avatar
Tung

Excellent CSS course! My CSS skill is still very far from the professional level.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?