Click here to Skip to main content
13,255,974 members (50,579 online)
Rate this:
Please Sign up or sign in to vote.
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 type="text/javascript" src="scripts/swfobject.js">
    <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(";video_id=u1zgFlCw8Aw&amp;enablejsapi=1&amp;playerapiid=ytplayer", "ytplayer", "400", "300", "8", null, null, params, atts);

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; }
Posted 3-Nov-11 12:26pm
Updated 3-Nov-11 13:14pm

1 solution

Rate this: bad
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 :)

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171114.1 | Last Updated 3 Nov 2011
Copyright © CodeProject, 1999-2017
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