Ning Developer Network

Hello!
I just used the "Flash as Network Header" from the Help Center, but now my lovely flash header is all the way to the left.
Is there some code I can insert into the hack to make it centered?
Thanks!!

Share

Replies to This Discussion

Alanna,

You can try this one to get it centered:

<div style="width:100%">
<center>
--Your Flash code header here--
</center>
</div>


Let me know-

LRon
Sympho Networks
Thanks LRon, but it didn't work.
Here's the code that I've got:


/**
* Tracking Code Hack: Replace the Header of the network with a swf
**/

var headerSwfUrl = "http://api.ning.com/files/6eb8OLc0sX1ZdQzyMNS6X1b6bQcwWmNKg-yOD2bPlpMXSQDSJfYfjHkTFc*M405fuUV*x-but9K3fY63R3nV54KsYbauzbq5/ningheader.swf";
var headerSwfWidth = 940;
var headerSwfHeight = 300;
var newHeaderHtml = ' http://www.macromedia.com/go/getflashplayer" allowscriptaccess="never"> ""> '; var headerElement = document.getElementById('xg_masthead');

//replace the old header with the new one
headerElement.innerHTML = newHeaderHtml;

//change the id as a simple way to remove all css attached to it
headerElement.id = 'newheader';





Where would I put the code you gave?

Thanks so much!!
I have the same problem. The flash banner seems to be aligned to the left, anyone have a solution for it?

Alanna said:
Thanks LRon, but it didn't work.
Here's the code that I've got:
/**
* Tracking Code Hack: Replace the Header of the network with a swf
**/

var headerSwfUrl = "http://api.ning.com/files/6eb8OLc0sX1ZdQzyMNS6X1b6bQcwWmNKg-yOD2bPlpMXSQDSJfYfjHkTFc*M405fuUV*x-but9K3fY63R3nV54KsYbauzbq5/ningheader.swf";
var headerSwfWidth = 940;
var headerSwfHeight = 300;
var newHeaderHtml = ' http://www.macromedia.com/go/getflashplayer" allowscriptaccess="never"> ""> '; var headerElement = document.getElementById('xg_masthead');

//replace the old header with the new one
headerElement.innerHTML = newHeaderHtml;

//change the id as a simple way to remove all css attached to it
headerElement.id = 'newheader';





Where would I put the code you gave?

Thanks so much!!
I've actually wanted my flash banner to be to the left, is there anyway you could guide me to making that happen?
Hi guys,

You can try adding a center tag starting inside the newHeaderHtml string (enclosed quote)

var newHeaderHtml = '<center>>current code here...</center>'
thank you!! it worked!

LRon said:
Hi guys,

You can try adding a center tag starting inside the newHeaderHtml string (enclosed quote)

var newHeaderHtml = '<center>>current code here...</center>'
Sure thing Kathy, glad it works--

LRon
Sympho Networks

RSS

© 2009   Created by Ning Developer Admin

Badges  |  Report an Issue  |  Privacy  |  Terms of Service