Jump to content
xisto Community
mrdee

Embedded Object Transparency Making an object transparent

Recommended Posts

Hi,
does anyone know if it is possible to make a control panel of an embedded object transparant, and if so, could you let me know how it is done?

I put a piece of music on my web site earlier, with a control panel to adjust the volume, start/stop etc.
The problem is, I have also put a Christmassy background on the site and the white area around the control panel makes it look somewhat untidy.
Here is the code I used for the embedding:

<div align="center"><embed src="Music/Stille Nacht.mp3" width=150 height=115 autostart=true align="center" loop="true"></div>
If anyone knows a solution to my problem I would be extremely grateful.

Thanks in advance.

Share this post


Link to post
Share on other sites

this should work

<div align="center"><embed style="display:none" src="Music/Stille Nacht.mp3" width=150 height=115 autostart=true align="center" loop="true"></div>

Share this post


Link to post
Share on other sites

I checked out your code on your site

<embed width="150" height="115" align="middle" loop="true" autostart="true" src="Music/Stille Nacht.mp3" style=""/>

style has no value thats probably why. worse case i think if you assign values of 0 to height and width it will hide it lol. or else you can always try assigned the style attribute to the div tag I'm sure it can work there also. if that still dosent work you can always move that div -100 px out of the screen or something.

Share this post


Link to post
Share on other sites

I don't know how that is possible.
upon inspection of my code I get this:

<div align="center"><embed style="display none" src="Music/Stille Nacht.mp3" width=150 height=115 autostart=true align="center" loop="true"></div>
Just like you passed it on.

Weird.

Share this post


Link to post
Share on other sites

you definitely need a : in between style="display:none"make sure its like this

style="display:none"

if that still dont work try

style="display:none;"

The first seems to work for me on my local server. maybe its just my broswer rendering it incorrectly and allowing any errors to pass. I'll check again

Share this post


Link to post
Share on other sites

I see, I had indeed missed the colon out.However, when I did slot it in, the panel was gone, but so was the music.You see, what I meant was, around the panel there is a white square that clashes with the background.I do prefer to have a panel where people can turn the music off if they like, or adjust the volume.What I did ask, really, was whether you could make that panel and its surroundings transparant, so that the background comes through.Thanks.

Share this post


Link to post
Share on other sites

sorry bud, I never read things properly so its the ugly white space you want to get rid of? I think its caused by the height attribute

height="115"

I think if you lower it it may get rid of the white space but I think this method may have another problem since different broswers will render it differently.yeah I jsut noticed under firefox you will see the white box but under safari it will show only the control bars.I guess a more proper way is to remove background off the <embed> tagyou can try

<embed style="background:none;"

oror

<embed style="background:none"

I'm not sure whats more correct with a ';' or without. hope that works for you.edit: dosent seem to work :P I'll keep trying this is a annoying little problem.

Edited by sonesay (see edit history)

Share this post


Link to post
Share on other sites

There you go, did it.I lowered the height from 115 to 15, works OK in Firefox and IE.If you could just let me know how Safari shows it.(I did use the "background:none;" too, but I don't think that made any difference).Thanks a lot for your help.

Share this post


Link to post
Share on other sites
Embedded Objects over ImagesEmbedded Object Transparency

Is it possible to place embedded objects over images in an html document. Example, I would like to place and embedded you tube video over a large image that spans much of the page. Thanks

Share this post


Link to post
Share on other sites
embedded object transparencyEmbedded Object Transparency

you can change the opacity of the player by using style="filter:alpha(opacity=0)" in the embed tag. Just try this

-reply by Sujal

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.