471,618 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

CSS & Flash

ashkhn
1
hi there

well i dnt wanna waste anytime and so ima gonna come to da point.
well i have this stylesheet and instead of an image i wanna a flash object. i have tried pasting the code but it doesnt seem to work. i dont want in my html/xhtml but in my css. is there a way. if so please help.

heres my css

.......continued
/* CSS Document */


#search_inner .inputbox {
border: 0px;
padding: 3px 3px 3px 5px;
font-family: arial, helvetica, sans-serif;
font-size: 11px;
color: #990000;
}

#header_outer {
text-align: left;
border: 0px;
margin: 0px;
}

#header {
position: relative;
float: left;
padding: 0px;
margin-right: 2px;
width: 735px;
height: 150px;
background: url(../images/header_short.jpg) no-repeat;
}


#top_outer{
float: left;
width: 165px;
}
........continued....

i want a code that i can use to replace the background jpeg (in bold) with a flash

thank you in advance.

Ashif
Oct 19 '07 #1
2 1371
drhowarddrfine
7,435 Expert 4TB
This cannot be done with CSS. You must use the <object> element from html to insert a flash object. You can google for that.
Oct 19 '07 #2
JamieHowarth0
533 Expert 512MB
Absolutely true from drhowarddrfine - but I would say if it's just an animated image that doesn't actually do anything then use an animated GIF (which you can export directly from Flash) and set that as the background using CSS.

Any BLOBS (Binary Large OBjectS) cannot be set in the background using CSS. However, you could do a clever workaround...

Split your page into two <div>'s - one to contain the Flash object and one to contain your actual page content. Then use this CSS:

Expand|Select|Wrap|Line Numbers
  1. div#flashcontainer {
  2.     z-index:1;
  3.     opacity:100%;
  4.     position:absolute;
  5. }
  6.  
  7. div#contentcontainer {
  8.     z-index:2;
  9.     opacity:50%;
  10.     position:absolute;
  11. }
  12.  
This will create 2 div's, one to hold your Flash animation and one to hold your actual page content. The content placeholder will be semi-transparent and directly on top of the Flash container so the Flash will show through as a "background".

Hope it helps.

medicineworker
Oct 19 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Ralph Seguin | last post: by
10 posts views Thread by Steve Cook | last post: by
2 posts views Thread by Harris Kosmidhs | last post: by
5 posts views Thread by ASP.NET explorer | last post: by
3 posts views Thread by mentos07 | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.