Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

flash embed tag does not obey percentage size, even with html and body at 100%

  • 2 iimpendulo
  • 25 inale ngxaki
  • 2 views
  • Impendulo yokugqibela ngu nutria

more options

For some reason i cannot get this swf file to show at 90% width and height. i have tried adding a style sheet in the header to explicity set the html and body to 100% but this still does not help. can anyone see if there is a problem in the code?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title></title>
<style type="text/css">
html, body {
  	margin: 0; 
	padding: 0;
  	height: 100%;
	width: 100%;
}
</style>


</head>

<body>
<center>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="90%" height="90%" ID="Captivate1">
  <param name="movie" value="tutorial.swf">
  <param name="quality" value="high">
  <param name="menu" value="false">
  <param name="loop" value="0">
  <embed src='tutorial.swf' width='90%' height='90%'  quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'/>
</object>


<BR>
<p>
<align=center><a Href="javascript:window.close();">Close Window</a>
</p>

</center>


</body>
</html>
For some reason i cannot get this swf file to show at 90% width and height. i have tried adding a style sheet in the header to explicity set the html and body to 100% but this still does not help. can anyone see if there is a problem in the code? <pre><nowiki><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <style type="text/css"> html, body { margin: 0; padding: 0; height: 100%; width: 100%; } </style> </head> <body> <center> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="90%" height="90%" ID="Captivate1"> <param name="movie" value="tutorial.swf"> <param name="quality" value="high"> <param name="menu" value="false"> <param name="loop" value="0"> <embed src='tutorial.swf' width='90%' height='90%' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'/> </object> <BR> <p> <align=center><a Href="javascript:window.close();">Close Window</a> </p> </center> </body> </html></nowiki></pre>

Ilungisiwe ngu cor-el

Isisombulu esikhethiweyo

That may happen because of the <center> element that doesn't have a height and width specified. Remember to specify dimensions for all containers if you use percentages, otherwise you may end up with 90% of 0 or a default value.

Funda le mpendulo kwimeko leyo 👍 4

All Replies (2)

more options

Isisombululo esiKhethiweyo

That may happen because of the <center> element that doesn't have a height and width specified. Remember to specify dimensions for all containers if you use percentages, otherwise you may end up with 90% of 0 or a default value.

Ilungisiwe ngu cor-el

more options

you are correct, thanks