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

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

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

  • 2 uphendule
  • 25 zinale nkinga
  • 5 views
  • Igcine ukuphendulwa 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>

Okulungisiwe ngu cor-el

Isisombululo esikhethiwe

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 ngokuhambisana nalesi sihloko 👍 4

All Replies (2)

more options

Isisombululo Esikhethiwe

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.

Okulungisiwe ngu cor-el

more options

you are correct, thanks