# TopMargin issues in Firefox



## ABERROOWNN (Apr 17, 2008)

Ok so here is the deal. My website looks Great in IE6/7 and Safari.

But in firefox it keeps throwing my flash object to the top of the screen. 

The site is http://198.106.24.178/test.html

if someone could tell me what I am doing wrong...that would be great.

-Aeron


----------



## jamiemac2005 (Jul 5, 2007)

Well, i'd suggest using css rather than html to place the element, i used a javascript shell to test the theory,

my suggestion is to rid of the topmargin bit to start with:

so you have:

```
<BODY BACKGROUND="testfiles/Page0_IMG_BCK.jpg" LINK="#0000ff" VLINK="#0000a0">
```

then give the div object(which holds the movie) an id so you can reference it in CSS 

```
<div id="myFlash" align="center">
```
then add some css like so:


```
<style type="text/css">
  DIV#myFlash{
      position: relative;
      top: 150px;
  }
</style>
```

After that and some cleaning your source for this page would look like:


```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<HTML>

<HEAD>
<meta name="keywords" content="ClubDesign Associates, John Cochran, Fort Worth, Texas 76102, Houston, Texas 77478, New construction, Renovation, Remodeling, Re-decorate, Golf Club facilities, Country Club interior design, Interior decorators architecture, Contemporary Casual elegance">
<meta name="description" content="ClubDesign Associates is an interior design firm specializing in new constructions, renovation, and remodeling country club, golf club and municipal golf club facilities. Our projects have ranged from a few hours of consultation to 8 million dollar projects. We feel that every project is important regardless of the size of budget.">

<TITLE> ClubDesign Associates </TITLE>

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
window.onerror = null;
manufacturer = navigator.appName;
versionnum = parseFloat(navigator.appVersion);
if (manufacturer.indexOf('Netscape') >= 0 && versionnum < 4.0)
location.href = 'testfiles/error.html';
if (manufacturer.indexOf('Microsoft') >= 0 && versionnum < 4.0)
location.href = 'testfiles/error.html';
//-->
</SCRIPT>

<style type="text/css">
  DIV#myFlash{
      position: relative;
      top: 150px;
  }
</style>

</HEAD>

<BODY BACKGROUND="testfiles/Page0_IMG_BCK.jpg" LINK="#0000ff" VLINK="#0000a0">

<div id="myFlash" align="center">
<OBJECT type="application/x-shockwave-flash" data="testIntro.swf"

  ID=Intro WIDTH=700 HEIGHT=300>

<PARAM NAME=movie VALUE="testIntro.swf">

<PARAM NAME=quality VALUE=high>

<PARAM NAME=loop VALUE=false>

<PARAM NAME=wmode VALUE=transparent>

</OBJECT>

</DIV>

</BODY>
</HTML>
```
the problem was you were using html to position your element and cross-browser compatibility is an effort with just html, with css things are more standardised, all you have to look out for is random margins etc.

google "w3schools" if you want to go further with css/javascript

Hope i helped,

Jamey


----------



## ABERROOWNN (Apr 17, 2008)

Jamey,

Thanks for your help. I will def be checking out that site and learning css.

Aeron


----------



## jamiemac2005 (Jul 5, 2007)

Glad i could help, i definately reccomend http://www.w3schools.com/ if you wish to learn any web-based language.

Cheers,
Jamey


----------



## Jaxo (Feb 21, 2008)

Throw my .2 cents into the ring.

With Firefox 3 your flash does not load.

Enter code before your closed </object> tag and it works in FF3. Don't have laptop in front of me to test in FF2.


```
<embed type="application/x-shockwave-flash" src="testIntro.swf" id="Intro" width="700" height="300">
</embed>
```
Good looking site, although I am not a fan of flash intro's. Thankfully your intro is short enough not to be annoying. :grin:


----------



## jamiemac2005 (Jul 5, 2007)

actually, sorry to contradict what you've said jaxo but i'm running firefox 3.05b and the flash loads fine and always did.

Might just be you, what do you mean by wont load? and what FF and flash plugin versions are you using? (just out of curiosity, it would be good to make his site completely compliant to safari, IE and FF). 

I'm not a fan of flash intros either actually, if you're writing flash sites they're only good if they're short(like aeron's).

Another small idea aeron, what else is going on your site?
because you could just extend the canvas of your flash site and have a full screen flash site?, rather than having to position things using dhtml

If you need any more intensive help from someone on a specific subject (HTML, Javascript, CSS and so on) then i'd also suggest becoming a member of webdeveloper.com (if you're not already), as 9/10 times you'll find that one of the people on there is an extreemly experienced developer and they can help you out loads (quickly too). Still i dont want to drive you away from this forum, as it's the best for any general issues you find with computers.

Cheers,
Jamey

P.S. aeron, do you use firefox as your main testing browser? I tend to when i'm writing sites, and yet you can use things like IE Tab(https://addons.mozilla.org/en-US/firefox/addon/1419) to emulate IE in firefox (making testing a whole lot quicker etc.) and do you have the latest firefox, etc. ?


----------



## Jaxo (Feb 21, 2008)

Firefox 3.0b5
Old Flash Version: Shockwave Flash 9.0 r115
New Flash Version: Shockwave Flash 9.0 r124

Funny thing. Updating flash version kicked me back to Firefox 2.0.. Had to install beta again.

Flash does not load(only background image) on site at all in FF3 with old and new flash version. While FF reverted back to v2 it did load just fine. Adding the <embed> tags within <object> does fix the issue via Firebug. I am assuming I am not the only one with this type of setup. ?? Wouldn't be safer to include the code to insure maximum browser usability?

:4-dontkno


----------



## jamiemac2005 (Jul 5, 2007)

wow that is random, i'm running Firefox 3.05b and the newer flash version and it worked fine, and yeah of corse, sorry i should have said that including it anyway would be best as it would probably maximise cross-browser compliance.

Cheers,
Jamey


----------



## ABERROOWNN (Apr 17, 2008)

I use firefox with the ie tabs but I never thought of testing it with those(GOOD IDEA)

Also about the site. They wanted an intro that had a little pizzaz in it so thats why I went with flash for the intro. The other pages are just gonna be straight dhtml or somethin like that....This is my first REAL site. I am proficient in the adobe creative suite and because of that i kinda landed this gig and I thought heck for a couple grand I could throw a site together. So basically i will have 4 more pages of just static graphics and text and one page with their 'portfolio' so i have been debating whether or not to use flash to do that as well.

Once again thanks for your time and Knowledge 

-Aeron


----------

