HTML and CSS Reference
In-Depth Information
4. Add the following style rule to the file (see Figure 7-10):
At the time of this writing,
the Opera browser has a
software bug that requires
audio controls displayed
as blocks to include a
background color.
/* Multimedia control styles */
audio {
background-color: white;
display: block;
margin: 5px auto;
width: 95%;
}
Figure 7-10
styles for the audio clip
displays the controls
as blocks on a white
background
sets the width to 95%
of the con taining
element, centered
horizontally
5. Save your changes to the file, and then reload jumbo.htm in your Web browser.
Figure 7-11 shows the appearance of the audio controls under six browsers.
Figure 7-11
the audio player as rendered by different browsers
Internet Explorer
Firefox
Opera
Safari for Windows
Google Chrome
Safari for the Macintosh
Notice that the appearance of the audio controls varies from browser to browser. If
you want your audio and video controls to share a uniform look, you must create your
own using form elements along with a JavaScript program to manage the actions of the
control buttons.
Search WWH ::




Custom Search