Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# CSS Java HTML XHTML Flash
Hi every one, i am currently working on a youtube player in C# and found the easiest to make work is to make a html homepage and put it into a C# webbrowser, and call the javascript with invokescript. everything works fine but the youtube video/swfObject have a "border" witch really isn't a border but the home page it self and i wanna have the swfObject/video moved all the way up to the corner i've paste some code here below:
 
</SCRIPT>
        <script type="text/javascript" src="scripts/swfobject.js">
        </script>
    </HEAD>
 
    <BODY bgcolor="Black">
        <FORM NAME="youtubeForm">
            <div id="ytplayer">
                <a href="javascript:void(0);" onclick="changePluginState();">Flash player 8+</a> and JavaScript enabled to view this video.
                <script type="text/javascript">
                    var params = { allowScriptAccess: "always" };
                    var atts = { id: "ytplayer" };
                    swfobject.embedSWF("http://www.youtube.com/apiplayer?version=3&amp;video_id=u1zgFlCw8Aw&amp;enablejsapi=1&amp;playerapiid=ytplayer", "ytplayer", "400", "300", "8", null, null, params, atts);
                </script>
            </div>
        </FORM>
    </BODY>
</HTML>
i dont wanna add a css file if i can avoid it, and i've tried to add style margin to both the javascript/swfObject and the div and the form nothing works... so does any one have any idea? the swfObject.js is picked up at google api homepage and the header mainly just have scripts to control the youtube player so that isn't importen for the design. please help to make the design look perfectly.
 
Thanks - Jackie
 
EDIT: i found some code as shown below but i cant make it work any how...
 
<style type="text/css" media="screen">
     { display:block; }
</style>
Posted 3-Nov-11 12:26pm
Edited 3-Nov-11 13:14pm
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

found the solution by doing this:
 
<BODY bgcolor="Black" style="margin-left: 0px; margin-top: 0px; margin-bottom: 0px">
 
everything works great now Smile | :)
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 3 Nov 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100