The code i have bellow is a code to show a flash video on my site, how can i make this fit to the screen of the user that is viewing it? what i have tried so far have not helped :/ <table border="0" width="100%" height="700" margin:0px;> <tr> <td align="right"> </td> <td align="center"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/$ <param name="movie" value="/loops/loops.swf" /> <param name="quality" value="high" /> <PARAM NAME="SCALE" VALUE="exactfit"> <embed src="/loops/loops.swf" quality="high" type="application/x-shockwave-flash" width="100%" height="700" SCALE="e$ </object> </td> <td align="left"> </td> </tr> Code (markup):
Well, first question is what do you mean by "fit to screen"? Fit to width? fit to height? Fit to both with aspect correction? For the most part CSS and HTML/object alone cannot do height reliably -- and in fact setting height in the markup makes it HARDER to do width without screwing up the aspect ratio. Of course, you're using "exactfit" which is by definition going to have aspect issues. For just auto-width, you'd want to set (assuming the object has the id "test"): #test { width:100%; height:auto; } Code (markup): If you want auto-adjusting on both axis, you're gonna need some scripting assistance, and there's no guarantee you'll be able to target height reliably. This is why most video sites (like say.. youtube) don't even TRY, and instead code a fullscreen option into their video file and/or player instead of doing it on-page. Now, that said, you'll probably also need to axe the tables for layout (a , attributes like align that have no business in any markup written after 1997, and that malfing outdated embed nonsense (even more laughable with the classID that's IE only mated to the IE "only" embed property...). Here, try my embed method: <!--[if IE]><object id="test" type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab" ><![endif]--> <!--[if !IE]>--><object id="test" type="application/x-shockwave-flash" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab" data="/loops/loops.swf" ><!--<![endif]--> <param name="movie" value="/loops/loops.swf" /> <param name="quality" value="high" /> <param name="scale" value="noborder" /> <p> <a href="http://get.adobe.com/flashplayer/"> Adobe Flash Player </a> is required to view this content. </p> </object> Code (markup): Valid STRICT, no malfing 'embed', proper fallback for when flash is missing... works properly in all browsers. Probably one of the few situations I see a valid reason to use IE conditional comments.