Percentage values for width and height are not set correctly
See original GitHub issueExpected Behavior
Passing in width and height options as 100% should set the iframe width and height attributes to 100%
Actual Behavior
The iframe width and height attributes are set to just 100, which is interpreted by browsers as 100px
Steps to Reproduce
new Vimeo.Player(90509568, {
width: '100%',
height: '100%'
})
Produces something like the following:
<iframe src="https://player.vimeo.com/video/90509568" width="100" height="100"></iframe>
Issue Analytics
- State:
- Created 7 years ago
- Reactions:13
- Comments:18 (8 by maintainers)
Top Results From Across the Web
What are the consequences of using percentage for width ...
It says that the width attribute must be set in pixels not in percent. But solving my problem was far more easier when...
Read more ><percentage> - CSS: Cascading Style Sheets - MDN Web Docs
The <percentage> CSS data type represents a percentage value. It is often used to define a size as relative to an element's parent...
Read more >Percentage of width not working - support - HUGO
I want to use the percentage of width to make the image responsive just like the screenshot did.(this was changed in the inspect...
Read more >width | CSS-Tricks
If your parent is set at 480px – as demonstrated by our demo – then the percentage is based on that value. So...
Read more >CSS Height, Width and Max-width - W3Schools
% - Defines the height/width in percent of the containing block; initial - Sets the height/width to its default value; inherit - The...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@rsichel107 why has this been closed? It’s an old issue but still a problem as far I can see. The ideas posted (setting iframe
heightandwidthafter the fact) seem like workarounds and not an actual solution.OK That’s not a problem for me coz all my videos are of the same aspect ratio and size.