Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

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

  • 2 trả lời
  • 25 gặp vấn đề này
  • 8 lượt xem
  • Trả lời mới nhất được viết bởi 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>

Được chỉnh sửa bởi cor-el vào

Giải pháp được chọn

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.

Đọc câu trả lời này trong ngữ cảnh 👍 4

Tất cả các câu trả lời (2)

more options

Giải pháp được chọn

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.

Được chỉnh sửa bởi cor-el vào

more options

you are correct, thanks