Centering widget @ _sub_header.html

Hello all... I've added a flash "radio player" to _sub_header.html. It works great, however I'm unable to center it, or adjust it's position in anyway: it always shows up left-justified.

 

The original HTML code is this:

 

<!--Wavestreaming.com SHOUTcast Flash Player-->                
<script type="text/javascript"

  src="http://player.wavestreamer.com/cgi-bin/swf.js?id=XID952M4MDEN8AU7">

</script>
<script type="text/javascript"

  src="http://player.wavestreaming.com/?id=XID952M4MDEN8AU7">

</script>

<!--End Player-->


Trying to move the radio player around, I copied a STYLE statement from another HTML code I once used, so it's now like this:


<!--Wavestreaming.com SHOUTcast Flash Player-->                

<script type="text/javascript" style="float:right; position:absolute; top:10px; right:55px;"

   src="http://player.wavestreamer.com/cgi-bin/swf.js?id=XID952M4MDEN8AU7">

</script>
<script type="text/javascript" style="float:right; position:absolute; top:10px; right:55px; "

  src="http://player.wavestreaming.com/?id=XID952M4MDEN8AU7">

</script>
<!--End Player-->


Yet, this has had no effect, I've changed the values in the STYLE statement in various ways, but the Radio Player always shows up left-justified, so I guess I'm not using the STYLE statement properly... How can I center or otherwise move around this widget...?


Many thanks in advance for any help or suggestion!


Quote · 8 Jun 2016

It does not work because your attempting to use html style tags in a script tag.

Script is javascript, not html. So you need to try a wrap the java script inside a html div and position the div instead. Like so.

<div style="float:right; position:absolute; top:10px; right:55px;">
  <!--Wavestreaming.com SHOUTcast Flash Player-->
  <script type="text/javascript" src="http://player.wavestreamer.com/cgi-bin/swf.js?id=XID952M4MDEN8AU7"></script>
  <script type="text/javascript" src="http://player.wavestreaming.com/?id=XID952M4MDEN8AU7"></script>
  <!--End Player-->
</div>

Your script does not work on my site, so i cannot test it. Support for 3'rd party scripts should be done by the 3'rd party. So if you continue to have trouble, then ask them for help.

https://www.deanbassett.com
Quote · 8 Jun 2016

You can't add style to a script tag. Try adding this to your code:

 

<style>
#scplayer {
margin:0 auto;
}
</style>

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 8 Jun 2016

 

Hello all... I've added a flash "radio player" to _sub_header.html. It works great, however I'm unable to center it, or adjust it's position in anyway: it always shows up left-justified.

 

The original HTML code is this:

 

<!--Wavestreaming.com SHOUTcast Flash Player-->                
<script type="text/javascript"

  src="http://player.wavestreamer.com/cgi-bin/swf.js?id=XID952M4MDEN8AU7">

</script>
<script type="text/javascript"

  src="http://player.wavestreaming.com/?id=XID952M4MDEN8AU7">

</script>

<!--End Player-->


Trying to move the radio player around, I copied a STYLE statement from another HTML code I once used, so it's now like this:


<!--Wavestreaming.com SHOUTcast Flash Player-->                

<script type="text/javascript" style="float:right; position:absolute; top:10px; right:55px;"

   src="http://player.wavestreamer.com/cgi-bin/swf.js?id=XID952M4MDEN8AU7">

</script>
<script type="text/javascript" style="float:right; position:absolute; top:10px; right:55px; "

  src="http://player.wavestreaming.com/?id=XID952M4MDEN8AU7">

</script>
<!--End Player-->


Yet, this has had no effect, I've changed the values in the STYLE statement in various ways, but the Radio Player always shows up left-justified, so I guess I'm not using the STYLE statement properly... How can I center or otherwise move around this widget...?


Many thanks in advance for any help or suggestion!


 
or simply

<center>
<script type="text/javascript"

  src="http://player.wavestreamer.com/cgi-bin/swf.js?id=XID952M4MDEN8AU7">

</script>
<script type="text/javascript"

  src="http://player.wavestreaming.com/?id=XID952M4MDEN8AU7">

</script>

<!--End Player-->
</center>


See screenshot

Unlock Your Future
Quote · 8 Jun 2016

Thank you all for the feedback! I settled for <center> and it works perfect... Many thanks for your help and patience! :-)

Quote · 8 Jun 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.