Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thowie

macrumors newbie
Original poster
Jan 23, 2009
2
0
I have a website written entirely in CSS format. In following DIV, I want to use a SWF file in place of the JPG. When I try to do this, it doesn't work. PLEASE HELP. How do I get the SWF file in this exactly location with CSS.

Thanks

div#ourCompany-bg div#ourCompany-part{
width:922px;
margin:0 auto;
padding:26px 0 28px 0;
background:url(../images/our-company-bg-pic.jpg) no-repeat 550px 0;
}
 
Only files with a mime type of image can be used as a background image. Your alternative is to use CSS to position an element with the flash in it and place text or whatever content you're wanting over top of it and use z-index to stack accordingly. There can be issues with things not stacking right when using flash though.
 
BUMMER....essentially how can I do what you mention. I'm new to CSS and the website I'm trying to update (written all in CSS) was inherited to me
 
BUMMER....essentially how can I do what you mention. I'm new to CSS and the website I'm trying to update (written all in CSS) was inherited to me

It all depends on the current CSS and HTML. Here's a simple example though to get you started.

HTML:
HTML:
<div id="myflash">Flash goes here</div>
<div id="othercontent">Content here</div>
CSS:
Code:
#myflash {
 position: absolute;
 top: 5px; left: 5px;
 width: 600px; height: 400px;
 z-index: 1;
}
#othercontent {
 position: absolute;
 top: 5px; left: 5px;
 width: 600px; height: 400px;
 z-index: 2;
}
* Just an example though.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.