PDA

Click to See Complete Forum and Search --> : dead center spaced website, how to?



snyx
09-09-2004, 10:52 PM
http://www.adjustedmusic.com

How can I center my website in the same way?
Where it sits in the dead middle of any screen size.

Thanks!

ZorTiger
09-10-2004, 08:24 AM
That site uses EVIL frames.

What i did for this on my webpage, was simply put a table 100%x100% and aligned center.

snyx
09-10-2004, 02:16 PM
no doubt, I mean by center in the middle vertically.
not horizontally, thatís a sintch.

ZorTiger
09-10-2004, 05:16 PM
You mean something like this:
http://www.avataur.com/center.htm





<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="22" height="22" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="http://www.avataur.com/logo.jpg" width="400" height="253"></td>

</tr>
</table></td>
</tr>
</table>
</body>

SJT
09-12-2004, 02:30 PM
Colin Moock documents how to get your flash to fill the whole browser window, if that's any use.

http://www.moock.org/webdesign/flash/fillthewindow.html

You could also use javascript to rewrite marginheight, marginwidth properties etc for the body tag to suit the size of the window minus the size of the flash object.

snyx
09-13-2004, 12:18 AM
Originally posted by ZorTiger
You mean something like this:
http://www.avataur.com/center.htm





<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="22" height="22" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="http://www.avataur.com/logo.jpg" width="400" height="253"></td>

</tr>
</table></td>
</tr>
</table>
</body>

thats the effect I want, but when I surround my table with your code it still comes out at the top. maybe there is something I am missing in the conversion?

catbert303
09-13-2004, 08:34 AM
Hi,

Centring using tables relies on non-standard behaviour, hence some standards compliant browsers may not centre the movie correctly - this may vary depending on which rendering mode the browser is using - most modern browsers have at least 2 rendering modes standards compliance and "quirks mode" standards compliance mode is triggered by the use of a valid doctype in the page.

A CSS solution may be better (i've not tested in all browsers - but it worked ok in opera 7+, firefox and ie 6 on windows)



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>centred</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
#mymovie {
width: 500px; height: 400px; /* adjust these values to match your movie */
position: absolute;
left: 50%; top: 50%; /* position the centre of the movie in the centre of the screen */
margin: -200px 0 0 -250px; /* adjust the values 200 and 250 so they are half that of the height and width of your movie */
}
</style>
</head>
<body>
<div id="mymovie">
your object and embed tags go in here
</div>
</body>
</html>