Referencing the DIV Container by DIV Id in Player V3

You can reference the DIV container by its DIV Id.

In the myvideo.css file we defined some very simple styles for the playerwrapper div container. By giving the div an id, you can then reference the player container by its div id name. In the following example, the div id is playerwrapper. The player is:
  • inset from the margin.
  • given a black background.
  • given a border.

In addition to the prior styles, the player opacity is set to make the video slightly transparent. In a normal video playback, this wouldn’t be desirable. However, you could use this CSS style to set the player to opaque when the viewer selects pause or for some other event. You can create any number of player UI styles and themes using CSS and JavaScript.


The following example shows how to define a div id for a div container and apply some simple styles.

#playerwrapper {
    width: 800px;
    background-color: black;
    margin: 58px;
    opacity: 0.5;
    border:10px solid silver;

Was this article helpful?