PDA

View Full Version : hi guys


iheartdesign
04-26-2007, 10:59 AM
hi everyone its probably really simple but im really rubbish using code im using dreamweaver and it never works how i want it to. basically i have my .swf file on a html page and i want it centered in the middle of the broswer (complete centre) and i also want it to stay centered no matter what screen rez or whether the window is resized.

valign=centre and align=centre

doesnt seem to work, any ideas?? thnx for any help - heres the full code of the page;

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Index</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body bgcolor="#000000">
<script language="JavaScript">
function Launch(page, width, height) {
OpenWin = this.open(page, "kirupa", "toolbar=no, menubar=no ,location=no, scrollbars=yes, resizable=yes, width=" + width + ", height=" + height + ", top=" + (screen.height/2 - height/2) + ", left=" + (screen.width/2 - width/2) + "\"");
}
</script>
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="132" height="122">&nbsp;</td>
<td width="78">&nbsp;</td>
<td width="772">&nbsp;</td>
<td width="141">&nbsp;</td>
</tr>
<tr>
<td height="515">&nbsp;</td>
<td colspan="2" align="center" valign="middle"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="850" height="515">
<param name="movie" value="1.swf">
<param name="quality" value="high">
<embed src="1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="850" height="515"></embed>
</object></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="73">&nbsp;</td>
<td valign="top"><embed src="music.mp3" width="0" height="0"></embed></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="57">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>

kdd
06-19-2007, 03:21 AM
Not sure if you're still looking for an answer, but here it is:
http://www.milov.nl/code/css/verticalcenter.html

And here: http://www.wow-factor.com/forums/index.php?showtopic=2806&st=0&p=16687&#entry16687

You'll have to change margin-top/left depending on width/height of your obj.

The milov one, you should open in FF and use firebug to see what goes on... :)

And please, no tables. I learned my lesson the hard way... :( Use CSS instead.

Templarian
06-19-2007, 12:59 PM
valign=centre and align=centre

that made me laugh centre its spelled center (doesn't matter it won't work just found it funny... probably a language thing).

TheColonial
06-19-2007, 11:47 PM
Centre = a place considered the hub of information for something (like an Information Centre, or Sports Centre)

Center = right in the middle :)

Templarian
06-19-2007, 11:58 PM
or Centre Street, the road I drive on to get to work.