;

PDA

Click to See Complete Forum and Search --> : [RESOLVED] How to center...


Nionicle
04-26-2007, 11:40 PM
Maybe I should have titled this...
Save me from going insane.
Or about to jump off the bridge....

Anywho... The .swf file stays centered to the back ground in the amazing
INTERNETS EXPLORERRERERERERR

But in mozilla... The flash centers very differently...


Basically.. I want it to look like it does in internet exploder in all browsers.


http://www.mentaldeficit.com/Test/index.html

And yes... the back ground image is large and horrid. So sorry to hurt your eyes.
Of all the things to get frustrated with.... I choose webdesign.... sigh


mike nio weirdo .....whatever you want to call me

catbert303
04-27-2007, 04:02 AM
Hi,

The linked page looks the same for me in IE 6, Firefox 2 and Opera 9. I can try IE 7 and Safari when I'm home from work. Do you have a screenshot showing the differences you're seeing?

1407
04-27-2007, 05:07 AM
looks the same in FF and IE here too.

Nionicle
04-27-2007, 09:37 AM
Hehe... I forgot to mention...
In firefox when you resize the browser the flash content sort of moves out of the designated area. But In internet explorer it seems to stay where it should.

Hopefully that clears some things up







This is my 1337 post (wahoooo)

ihoss.com
04-27-2007, 04:18 PM
nope, works fine here. Its in the center no matter how I resize it.

Nionicle
04-29-2007, 12:10 PM
http://www.mentaldeficit.com/iemozzie.JPG

jasonsplace
04-30-2007, 06:29 PM
Are you using an older version of Firefox? I just tried it in IE 7 and in Firefox and I see it the same as your IE screenshot in both browsers when I resize.

Nionicle
04-30-2007, 07:22 PM
I just checked for updates and it said I am up to date...
hmmm
I don't know what to think now...

jasonsplace
05-01-2007, 10:13 AM
I just went check it again to see if I could see anything strange and the background image is missing now.

Nionicle
05-01-2007, 11:26 AM
Yeah I took it off last night. I put up a much smaller sized one (in kb).
It is the same back ground I used in my example picture.
Which i also too off.
If you want that one back up just ask.

Glad to see this mystery hasn't been given up on.

Nionicle
05-07-2007, 11:55 AM
=( I still haven't made any progress on this issue.

jasonsplace
05-07-2007, 12:12 PM
When you had the blue background it was working for everyone correctly in both browsers but when you switched to the red it broke. What all did you change when you changed the background color. Also, is there a reason that you are using Flash to display your text?

Nionicle
05-07-2007, 12:16 PM
I don't believe I changed anything in the code.
I just deleted the last picture and uploaded a new one with the same name.
I have flash there because I was going to make the website in it.
Let me change up the flash content inside.. right now the .swf is 800px and the BG content area is only like 600.

Nionicle
05-07-2007, 12:29 PM
Ok I changed it.
It is now a gray square as the flash movie to show the content area.

Nionicle
05-07-2007, 01:30 PM
Just for some added stuffs.

www.webagent007.com pulls off the same thing. Except it works in my browser.
Why my own site doesn't. Is beyond me.

sticks464
05-08-2007, 08:00 AM
Put your object code inside a div. Remove the <center> tag.
<div id="movie">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="550" HEIGHT="600" id="splash" ALIGN="top">

<PARAM NAME=movie VALUE="splash.swf">
<PARAM NAME=quality VALUE=best>
<PARAM NAME=scale VALUE=noscale>
<PARAM NAME=salign VALUE=T>
<PARAM NAME=wmode VALUE=transparent>
<PARAM NAME=bgcolor VALUE=#000000>

<EMBED src="splash.swf" quality=best scale=noscale salign=T wmode=transparent bgcolor=#000000 WIDTH="550" HEIGHT="600" NAME="splash" ALIGN="top"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</div>

Then set the margins with css
div#movie {margin:0 auto; width:550px; height:600px; }

also set the default margins with

*, html {margin:0; padding:0;}

This will put the flash in the exact center of the page irregardless of the monitor size or resolution.

Nionicle
05-08-2007, 10:09 AM
Hmmm... for me atleast. It still moves off of the center of the background as I minimize the window to sizes smaller than the width of the movie

Nionicle
05-08-2007, 10:42 AM
Officialy RESOLVED WAHOOOO

Thanks to Jasonsplace


<html>

<head>

<title>Mental Deficit-A personal portfolio of Michael Abernathy</title>

</head>

<style type="text/css">

body {
margin: 0px 0px 0px 0px;
padding: 0px;
background-color: #000000;
}
.content{
background-image: url(BasicBG.jpg);
background-repeat: repeat;
background-position: center top;
width: 100%;
height: 1000px;
}

</style>

<body>
<table border="0" cellpadding="0" cellspacing="0" class="content">
<tr>
<td>&nbsp;</td>
<td width="550" valign="top">

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="550" HEIGHT="600" id="splash" ALIGN="top">

<PARAM NAME=movie VALUE="splash.swf">
<PARAM NAME=quality VALUE=best>
<PARAM NAME=scale VALUE=noscale>
<PARAM NAME=salign VALUE=T>
<PARAM NAME=wmode VALUE=transparent>
<PARAM NAME=bgcolor VALUE=#000000>

<EMBED src="splash.swf" quality=best scale=noscale salign=T wmode=transparent bgcolor=#000000 WIDTH="550" HEIGHT="600" NAME="splash" ALIGN="top"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">

</EMBED>

</OBJECT>
</td>
<td>&nbsp;</td>
</tr>
</table>

</body>

</html>

ihoss.com
05-08-2007, 12:22 PM
sticks way is better. The only thing he forgot to mention is that you need position: relative in there as well:


div#movie {margin:0 auto; width:550px; height:600px; position: relative;}

also set the default margins with

*, html {margin:0; padding:0;}

jasonsplace
05-08-2007, 12:25 PM
Why is sticks way better? Doing things in all CSS may be a newer way of doing things but table layouts are tried and true. They've worked for years and continue to do so in all browsers equally. CSS is nice and all but sometimes it is a major pain in the neck when you want something to look the same in IE and Firefox and Opera and Safari and every other browser that your users may be using.

ihoss.com
05-08-2007, 12:32 PM
Don't say that! I feel all important and cool when I use proper CSS! I will gladly spend the better part of my day making my site XHTML strict, only to be certain that it might not work in all the other browsers. In fact I don't use tables at all, not even to eat off!

jasonsplace
05-08-2007, 12:41 PM
I'll admit that there's something special about completing a site that is written using proper XHTML and CSS but it is very time consuming and unnecessary for most projects. I can't respect the opinion though that tables are always worthless. What about for tabular data? Should tables not be used there? Of course they should be. They were designed for that. Should they be used for site layouts? Maybe. Does it make laying out a site a whole lot easier and more compatible? Definitely. XHTML/CSS would be really nice if all browsers played nicely but when your having to hack this to make it work in IE and hacking that to make it work in Firefox it is a pain in the neck.

ihoss.com
05-08-2007, 01:02 PM
I used to make sites with tables before I got into css, and one thing I noticed was that a page made with tables looks completely different from one made with css. Thats the problem most people coming from tables have; they try to make the same page in css, but you can't. It takes a while before you realize that, but when you understand that you have to design a page in a different way, then it goes smoothly. Tables have their uses, but once you have started making sites with css, then you don't go back. The sites look more professional, and it requires so much less code to do the same thing.

Anyways, there is nothing wrong with making a site with tables :)

jasonsplace
05-08-2007, 02:26 PM
I do sites both way's. When i start in the design stage I don't think about what I want to do the site in. I usually start in Photoshop, make it look exactly how I want it to look and then figure out what the best thing to do from there is.