Click here to Skip to main content
11,641,971 members (60,286 online)
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 11:26am
Edited 3-Nov-11 12: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)

  Print Answers RSS
0 DamithSL 245
1 Afzaal Ahmad Zeeshan 170
2 Sergey Alexandrovich Kryukov 159
3 OriginalGriff 110
4 Mika Wendelius 90
0 Mika Wendelius 460
1 DamithSL 353
2 OriginalGriff 315
3 Sergey Alexandrovich Kryukov 179
4 Afzaal Ahmad Zeeshan 169


Advertise | Privacy | Mobile
Web04 | 2.8.150731.1 | Last Updated 3 Nov 2011
Copyright © CodeProject, 1999-2015
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