Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Internet Explorer 9 beta HTML5 video tag not supporting relative width/height?

Is it correct that IE9 (Beta & Preview) don't support relative width/height on the html5 video tag?

Chrome, Safari & Firefox all nicely accept a width=50%, but IE9 seems to read it as 50px. (Video is showing in all 4 browsers so no problem there).

I was wondering if it's a bug/feature yet to be implemented or permanent solution.

J.

like image 452
jbokkers Avatar asked Feb 10 '11 12:02

jbokkers


3 Answers

Have you tried setting the height and width using CSS rather than the HTML element's attributes?

ie rather than:

<video src='whatever' height='50%' width='50%'>

you could try:

<video src='whatever' style='height:50%; width:50%;'>

...or, of course, put the styles into your separate CSS file.

like image 70
Spudley Avatar answered Dec 15 '22 00:12

Spudley


I just installed the IE9 Release Candidate and since there's no change I guess we can call this their permanent solution.

Just to be complete: <video width="100%" height="100%"></video>

Will render as 100px width in IE9. In latest versions of Chrome, FireFox, Safari and Opera this will be rendered 100% width of the parent div.

like image 25
jbokkers Avatar answered Dec 14 '22 23:12

jbokkers


I used CSS to style the tag for width:100% and height:100%. I tried IE9 Beta and that seemed to work.

like image 39
dudeman Avatar answered Dec 15 '22 00:12

dudeman