HTML5 Video in IE9 and 8: Loads Successfully but Appears "Invisible"

I have an HTML5 video tag on a webpage, along with a flash fallback for Internet Explorer 8. The video element is initially hidden using display:none and attached to a parent 'a' until a play button (image) is clicked. When the play button is pressed, the video element is then moved to parent 'b' (a box within an overlay) and I use jQuery's show() method.

When viewing the page in Chrome, Firefox, and Safari, the video appears as expected. However, when I try to view it in IE9 and IE8, the video does not display visually, even though it is present. If I right-click where the video should be, I see a video-related context menu. Clicking play at that point makes the video appear and play normally.

Interestingly, changing certain CSS properties of the video element can sometimes make the video display. For example, switching the box-sizing property from border-box to content-box may cause the video to suddenly become visible, and vice versa.

While making these changes through the browser console seems to work, attempting to do so within my script does not produce the desired result.

Below is the CSS styling for the video element and its inherited properties:


*, html > * { box-sizing: border-box; }
audio, canvas, video { display: inline-block; }
.center { text-align: center; }
#section1 #videobox .videoPlayer { cursor: pointer; }

#video {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    z-index: 10003;
}

It seems like this issue might be related to a peculiar layout problem, although luckily it doesn't involve dealing with hasLayout issues found in older versions of IE.

Update I was able to replicate the problem in a JSFiddle demo: http://jsfiddle.net/e76x5/5/

Answer №1

When faced with a similar issue, my solution involved removing all CSS height declarations of the video element and then using JavaScript to set the height after it had been displayed. For further insight, you may want to look into this IE9 HTML5 video display problem resource

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Display different website content in a div when the page loads

My current project involves creating a team website hosted on a LAMP server. This website includes various "team pages" dedicated to different age groups. I am facing the challenge of integrating "external" content (from another page within my domain) into ...

Guide to creating a vertical handler that can be resized

Did you know that you can resize tables in http://www.jsfiddle.net? I'm curious about how to resize just the "Vertical Handler". Could someone share the source code with me? If possible, please provide an example on http://www.jsfiddle.net. ...

Develop a program using the local time of Barcelona as a reference

I'm having trouble with my code that is supposed to change the background and image based on the current hour in Barcelona. It doesn't seem to be working properly. JAVASCRIPT CODE var now = new Date(); var offset = now.getTimezoneOffset(); var ...

What methods can be utilized to create a versatile ratings widget using LESS instead of traditional CSS?

Recently, I stumbled upon a versatile one-image rating widget created with SASS by the team at AirBnB. I am interested in replicating something similar using LESS. While I could manually write out the CSS, I prefer to generate it dynamically with LESS. My ...

What is the proper way to include jQuery script in HTML document?

I am facing an issue with the banners on my website. When viewed on mobile devices, the SWF banner does not show up. In this situation, I want to display an <img> tag instead, but the jQuery code is not functioning correctly. My template structure l ...

Finding the Right Spot to Edit HTML Code in Microsoft Dynamics CRM

Is it possible to change the width of a custom iframe in Microsoft Dynamics CRM that is currently set at 1900px? <div id="mainContainer" class="classname_here" style="max-width: 1900px"> I was able to change it to 100% using a browser extension. Ca ...

Bootstrap 3 Full-Width Responsive Image Overlapping

I have designed a grid layout with col-md-7 on the left side and col-md-5 on the right side. The images in the col-md-5 are responsive and have a full-width of col-md-12. <div class="container"> <div class="row"> <div class="col ...

Modifying the font style within an ePub document can affect the page count displayed in a UIWebView

Currently in the development phase of my epubReader app. Utilizing CSS to customize the font style within UIWebView, however encountering a challenge with the fixed font size causing fluctuations in the number of pages when changing the font style. Seeki ...

Altering the ASP DropDownList's background color solely with CSS modifications

Is there a way to change the background colors of dropdownlists in my C# web app using CSS instead of specifying each one individually? In simpler terms, I'm trying to avoid having to write out code like this for multiple dropdowns: private void For ...

What is the best way to achieve complete transparency for an input element?

Is there a way to make the input element completely see-through, allowing the body background image to show through instead of the parent's background color? Sample HTML code: body{ background-image:url("https://upload.wikimedia.org/wikipedia ...

Guide on how to navigate through sub-sections within a larger section

I am in the process of developing a rails app where I would like to include a side div for displaying news updates in a vertical feed style. I have made some progress with the layout, but now I am facing issues with finding a suitable news-ticker plugin th ...

Responsive design is achieved through the use of CSS media queries targeting the

Could someone please clarify the meaning of the following value? Does it indicate that the output device must support exactly 256 colors, or is it acceptable for the output device to have 256 colors or fewer, or does the device need to support 256 colors ...

Guide on creating a line chart resembling the one in Highcharts library

I would like to create a line chart using the HighChart library, using data similar to what is shown in the image below. However, I am not familiar with HTML, CSS, or JavaScript and don't know how to go about developing this. Can anyone provide guidan ...

How can you specify the maximum width and height for a TextField in JavaFX using CSS?

Is there a way to set preferred and maximum width and height for a TextField using CSS? ...

Troubleshooting: CSS causing images to not show up on

Struggling with a CSS issue, I can't seem to solve it. My images are not showing up on the webpage even though the URLs are correct and the HTML is properly written. There is no specific styling applied to the images, and the only styling for the ima ...

How to access the formData value during the beforeSend function in a JQuery ajax request

Utilizing jQuery ajax, I am working on uploading a file. Specifically, I am appending the File and Path to the FormData. My goal is to access the content of both File and Path within the ajax beforeSend function. Here's an example: var formData = new ...

jQuery Data Tables display the message "No data available in table" even when there is data present and visible on the table

After spending countless hours searching for a solution to my problem, I came across two potential fixes: one addressing "No Data Available in Table" for jQuery DataTables found here, and another dealing with the issue of data not displaying properly durin ...

The issue of a background image not appearing on Chrome and Firefox has been identified

I am experiencing an issue where a background image is not showing up on Chrome or Firefox, but it displays properly on other browsers. The problem occurs with relative and hard links Substituting the image file works, but the video disappears Adblock is ...

The custom jQuery validator that triggers a PHP function is malfunctioning

My custom validator, which utilizes a jQuery plugin, is designed to call a PHP page on the server for input validation against a database. While I am not an expert in JavaScript or AJAX programming, this solution was the best I could come up with. jQuery. ...

Is it possible for CSS in React to cause the vanishing of all buttons

I'm encountering an issue where the CSS styling applied to every button in my NavBar is causing a specific button labeled 'Search' to disappear when it shouldn't. The problem stems from NavBar.css, which contains a media query that unin ...