Center on Page

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

I've embedded this code on the page and I'd like to have it centered on the
page. Here is my code. Whats the code and where do I place it? Thanks in
advance!!!
<a href="http://www.restingtributes.com/media/v13.swf"
style="display:block;width:425px;height:300px;" id="player"> </a>
<script language="JavaScript"> flowplayer("player",
"media/flowplayer-3.1.5.swf"); </script>
 
Richard said:
I've embedded this code on the page and I'd like to have it centered on
the
page. Here is my code. Whats the code and where do I place it? Thanks in
advance!!!
<a href="http://www.restingtributes.com/media/v13.swf"
style="display:block;width:425px;height:300px;" id="player"> </a>
<script language="JavaScript"> flowplayer("player",
"media/flowplayer-3.1.5.swf"); </script>

Try

<div align="center">

<a style="text-align:center; width:425px; height:300px; border:1px solid
black;"
href="http://www.restingtributes.com/media/v13.swf"
id="player"> </a>
<script language="JavaScript">
flowplayer("player", "media/flowplayer-3.1.5.swf");</script>

</div>

I added the border so that you can see where it appears on the page. I
assume that the function flowplayer places some innerhtml into the <a> tag.
If so, you could make this an onload event
e.g.
<body onload='flowplayer("player", "media/flowplayer-3.1.5.swf")'>

<div align="center">
<a style="text-align:center; width:425px; height:300px; border:1px solid
black;"
href="http://www.restingtributes.com/media/v13.swf"
id="player"> </a>
</div>
 
Trevor Lawrence said:
Try

<div align="center">

<a style="text-align:center; width:425px; height:300px; border:1px solid
black;"
[snip]

P.S.
You may not want 'text-align:center' in the <a> tag. This centres the
content of the <a> not the <a> tag itself, which is done by 'align="center"'
 
Back
Top