Attributes for <EMBED ...>
WIDTH = "width expression"
HEIGHT = "height expression"

For such a simple concept -- the height and width of the embedded object -- choosing values for the HEIGHT and WIDTH attributes can be quite a thorny problem. Unlike images such as GIF and JPEGs, embedded objects do not necessarily have an inherent dimensions. Different browsers render different media types differently, and make different decisions about what to do if the object isn't exactly the height they want. Unfortunately leaving out the HEIGHT and WIDTH attributes is not an option. They are required and we have run across a few plugins that give nasty error messages if these attributes are missing

For sounds, try HEIGHT and WIDTH. These are the Netscape's preferred sizes, and MSIE adjusts to them well. There are different preferred sizes if you use some of the odd controls Netscape allows. See CONTROLS for more details.

For movies, try setting HEIGHT to 30 pixels greater than the height of the movie, the WIDTH to just six greater:

this code produces this

For other types of plugins, check the documentation, and experiment with different dimensions on different browsers.

About the Author
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.