Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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:

XML
</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...

XML
<style type="text/css" media="screen">
     { display:block; }
</style>
Posted
Updated 3-Nov-11 12:14pm
v2

1 solution

found the solution by doing this:

<BODY bgcolor="Black" style="margin-left: 0px; margin-top: 0px; margin-bottom: 0px">


everything works great now :)
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900