To scale an `
1. First, open the Webflow Designer and select the `
```css
.scaled-iframe {
position: relative;
padding-top: calc((9 / 16) * 100%); /* Adjust the aspect ratio here */
}
.scaled-iframe iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
```
6. Save the changes and publish/update your Webflow project.
Now, your `
Here's how this CSS trick works:
- The `padding-top` property is set to a percentage value, which is calculated based on the desired aspect ratio. In the example code, `(9 / 16) * 100%` sets a 16:9 aspect ratio.
- By setting the `
- The `
- Finally, the `
With this approach, the `