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!

Answers


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.


Need Your Help

Special character in path to open SQLite database connection

java database sqlite classnotfoundexception sqlitejdbc

I am trying to get a connection to a SQLite database (using Eclipse on Windows 8). Everything workes fine as long as the path name doesn't contain any special characters (like "é"). I tried to conv...

How do you get PHP, Symlinks and __FILE__ to work together nicely?

php linux symlink

On localhost. I have the following directory structure: