Chris P
Chris P

Reputation: 1

Display iframe video at different sizes for different browsers?

I'm having a bit an issue with embedding an iframe video. I was wondering if it is possible to set the height and width of the iframe based on which browser is being used.

For example, if viewing the video in Chrome, set height and width to 640 x 360 but if viewing on Safari, set height and width to 960 x 540.

Is this possible / fairly easy to implement?

Thanks in advance!

Upvotes: 0

Views: 63

Answers (1)

Kairowa
Kairowa

Reputation: 1121

This can be done with relative ease using the CSS Browser Selector (https://github.com/rafaelp/css_browser_selector), which adds the corresponding browser as a class to the html element, so that you can select it through CSS.

Upvotes: 0

Related Questions