WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > Browser Compatibility > [SOLVED] Background swf set to 100% not working in Firefox

Reply
  Thread Tools Display Modes
Old 28th July 10, 02:19 AM   #1
paragen
WLC Member
 
Join Date: Jul 2010
Location: NSW Australia
Posts: 3
Default Background swf set to 100% not working in Firefox

Hi guys & gals,
I'm new to the site, because clearly I need a support network to help me through some issues. One such issue is as follows:

I have created my website in Flash (No Problem), but then, after some research, I found out that if I place the ensuing swf file into a div, set padding and margin to 0, set height and width to 100% and voila, the swf enlarges and reduces depending on the browser window size. However this doesn't seem to work in Firefox. In fact with some adjustments the 2 urls that fetch my site react differently in Firefox. ie: www.iimagination.net results in 100px by 100px,
whereas www.iimagination.com.au is a lot larger but doesn't extend to the full size of the browser window, and doesn't adjust size with the window. Odd I know. The site works fine in Safari, Opera, IE and Chrome.
The coding is as follows:
CSS
/* hide from ie5 mac \*/
html, body {
background-color:#000000;
margin:0px;
padding:0px;
height:100% !important;
width:100%;
overflow:hidden;
}

#flashcontent {
height: 100%;
}
/* end hide */

background{position:absolute; width:100%; top:0px; left:0px; height:100%;
z-index:0;
}

The html is as follows (minus the meta tags):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<link rel="stylesheet" type="text/css" href="ii_style_sheet.css" />

</head>

<body>

<div id="background">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="100%" height="100%" id="mySwf">
<param name="allowScriptAccess" value="sameDomain"/>
<param name="allowFullScreen" value="true"/>
<param name="scale" value="scale" />
<param name="movie" value="mySwf.swf"/>
<param name="quality" value="high"/>
<param name="bgcolor" value="#000000"/>
<embed href="mySwf.swf" src="mySwf.swf" quality=high bgcolor=#000000 width="100%" height="100%" scale="scale" name="mainNav" salign="lt" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/></embed>
</object>

</div>

</body>
</html>

There may well be some unnecessary tags in there, such as src= since I have the href as well, maybe someone can tell me what doesn't need to be there.
The only error that comes up from all this is: "the tag name: 'embed' Not found in currently active versions.[XHTML 1.0 transitional].

Any advice is most welcome.
paragen is offline   Reply With Quote
Old 28th July 10, 01:59 PM   #2
rkrause
WLC Mod
 
Join Date: Sep 2009
Posts: 893
Default Re: Background swf set to 100% not working in Firefox

First thing i see is the background id isn't correct in your style. You have background {, and it should be #background {.

Ryan.
rkrause is offline   Reply With Quote
Old 28th July 10, 05:18 PM   #3
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,194
Default Re: Background swf set to 100% not working in Firefox

And you use id="background" without styling #background in your stylesheet

AND last but not least using property names for style rules is NOT good practice and and may cause problems in certain browsers.

Last edited by chrishirst; 29th July 10 at 11:17 AM.
chrishirst is offline   Reply With Quote
Old 28th July 10, 09:00 PM   #4
paragen
WLC Member
 
Join Date: Jul 2010
Location: NSW Australia
Posts: 3
Default Re: Background swf set to 100% not working in Firefox

THANKYOU RYAN AND CHRIS. I have been pulling my hair out on this, and a simple little hash solved all my dramas. A thousand thankyous!!!!
paragen is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:09 AM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyrightę 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.