Expand video to full width
Stretches video players and embedded frames to the full container width with a 16:9 ratio.
Code to copy
/* Make video players stretch to the full width of their container. */
video,
iframe[src*="player"],
iframe[allow*="fullscreen"] {
width: 100% !important;
max-width: 100% !important;
height: auto !important;
aspect-ratio: 16 / 9;
}
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's CSS panel and save — the effect appears instantly.
Rate this example
No ratings yet — be the first.