Transparent web pages?

Okay, here's the deal.

I want to create some dynamic desktop content.  So far as I can see, the only way to do that simply is to create a dynamic web page and put that on the desktop.  Fine, I have a simple example doing that with javaScript doing a rollover.  Unfortunately, the web page (which seems to be what you have to use) has a white background, which looks pretty shappy and stands-out on my desktop which has wallpaper on it (a graphics image).

So, I want to make the background of this HTML transparent.  I can't find any way of doing this.  The only thing that comes to mind is specifying a gif for the background of the page and making it an entirely transparent gif - but that doesn't seem likely.
LVL 1
Gene KlamerusTechnical ArchitectAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

seanpowellCommented:
I don't think you're going to be able to do this - but it's a nice idea. (Unless you want to buy a MAC)
0
dsynCommented:
Instead of making the html background transparent, make the backgound of the html point to the image you are currently using for your desktop...  Also consider using iframes inside your html for content because they're backgrounds can be transparent.

<html>
<head>
      <title>my desktop</title>
</head>

 <body bgcolor="#FFFFFF" leftmargin=0 topmargin=0 marginwidth="0" marginheight="0" background="location/of/my/desktop_wallpaper.jpg">

content


</body>
</html>
0
ahoffmannCommented:
<body style="background-color:transparent;">
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Gene KlamerusTechnical ArchitectAuthor Commented:
I don't think either of these will work.

First, if I set the image of the web content on my desktop to the same as an image.  Web content is places at user-defined locations on the desktop and the image behind it would use the upper-left of that web content as the origin for the image - so the image on the web page and the image on the desktop wouldn't correspond.

I tried setting the <body style...> tag, but it didn't work.  I still got the same white background.  It almost seems like I have to set the web content to the same color as the desktop and not use any images.
0
dsynCommented:
Inline Frames

Most people use inline frames in a table. It's easier to put it exactly where you want it that way.

This is the html you need:

<iframe src="initial page" height="height" width="width">

If you don't want a scrollbar in your frame, add this to the basic tag:

scrolling="no"

Or, if you always want the scrollbar to show up, put "yes" instead of "no."

If you don't want a border around it, add this:

frameborder=0  border="0"

If you want a small border, add this:

style="border: 1px solid black"

Obviously, change the size/color/type to whatever you want. The different border types are: solid, dotted, dashed, double, groove, ridge, inset, outset. It's important to leave frameborder="0" in the tag because otherwise the border will look ugly.

If you have an image as your main page background and want it to show through the inline frame, you have two options. First, you can add that image as the page background to every page, after adjusting it to the right size and making sure the edges are even with the larger image, or, you can add transparency to your frame.

To add transparency, add this to the frame tag:

allowtransparency="true"

That's all you need to do to the frame. You need to add this to <style> section of every page that will show in the frame:

body {background-color: transparent}

When you do that, the frame will have a completely transparent background. Sometimes it can be hard to read the text on your page because of this (which I found out while designing version 3). Sure, it looks great, but people will be more inclined to go to your website if they can actually read it. To have a semi-transparent background (which is what I have on version 3), you need to add opacity. Put this in your <style> section instead of the above:

body {background-color: white; filter: alpha(opacity=50)}

Change the background color to whatever color you want, and change the opacity to a number between 1 and 100.


0
dsynCommented:
the above is a quote from: http://innocentia.org/domain/tutorials/inlineframes.htm just for some super details

try this:


the iframe holder:

<html>
<head>
<title> Test Document </title>
</head>
<body>
<iframe src="iframesource.html" height="400" width="400" allowtransparency="true">
</iframe>
</body>
</html>

------------------------------
the iframe source (iframesource.html):

<html>
<head>
<title>iframe document</title>
</head>
<body style="background-color: transparent">

blaablaablaablaablaablaa
blaablaablaablaablaablaa
blaablaablaablaablaablaa
blaablaablaablaablaablaa
blaablaablaablaablaablaa

</body>
</html>
0
Gene KlamerusTechnical ArchitectAuthor Commented:
I'll need to give this a try.  As I said, this is for an Active Desktop on Windows XP.
0
seanpowellCommented:
Don't kill yourself on this one - as I mentioned, I don't think you're going to be able to pull this off :-(
0
ahoffmannCommented:
<body style="background-color: transparent">

is the solution, as I said.

If it does not work for you, you either have a buggy browser (or whatever renders your HTML), or there is another CSS definition (probably in the HEAD section) which is more restrictive.
0
seanpowellCommented:
With all do respect - that will have no effect. (It has nothing to do with a buggy browser...)
There is no way to make the browser canvas transparent against the desktop.
0
dsynCommented:
georgemarian is right, there is no way to make the browser canvas transparent against the desktop. That is why you use <body background="location/of/my/desktop_wallpaper.jpg">  in combination with transparent <iframes>... make sure your using Internet explorer as your default browser sense it is a part of the windows OS
0
seanpowellCommented:
I appreciate how you're trying to solve this dsyn - but the problem here is one of placement. Have you tested your solution?

How will you get the background image in the active web page to line up exactly against the background image on the desktop?
0
dsynCommented:
Actualy, I have created active desktops for my self before... It's alot of fun and makes it a lot easier to get stuff done.  I wrote one desktop background that had a form in it, so secretaries can send phone messages to people.  I know we can get this going for you, It's fun.

Don't use an actual desktop background, leave it empty.  Replace the background image with your html page that uses the <body background="location/of/image"> tag. In that same html page, setup tables to place the transparent <iframes>.
The iframes will actually be where the content is.

Make sure your parent table is set to 100%

this html would be your desktop wallpaper/background
-----------------------------------------------------------------------------------------------------------------------------
<html>
<head>
<title> Test Document </title>
</head>
<body background="location/of/image.jpg" leftmargin=0 topmargin=0 marginwidth="0" marginheight="0">

<table width=100% height=100% cellpadding=0 cellspacing=0 border=0>
        <tr>
              <td>
                   <table align=center>
                          <tr>
                              <td>
                                    <iframe src="iframesource.html" height="400" width="400" allowtransparency="true" name=iframe1 border=0></iframe>
                              </td>
                               <td>
                                     <iframe src="iframesource2.html" height="400" width="400" allowtransparency="true" name=iframe2 border=0></iframe>
                               </td>
                         </tr>
                   </table>
              </td>
        </tr>
</table>



</body>
</html>

---------------------------------------------------------------------------------------------------------
the iframe source (   iframesource.html and iframesource2.html   ):
---------------------------------------------------------------------------------------------------------

<html>
<head>
<title>iframe document</title>
</head>
<body style="background-color: transparent">

content

</body>
</html>


I hope that makes sense.
0
ahoffmannCommented:
ok, if the desktop is too stupid, how about setting the transparent flag in the image itself, then use it as suggeset with
  background="location/of/my/desktop_wallpaper.jpg
0
dsynCommented:
I have a correction sorry about that and some directions for the desktop setup:

main html
---------------------------------------------
<html>
<head>
<title> Test Document </title>
</head>
<body background="bg.jpg"  bgcolor="#FFFFFF" leftmargin=0 topmargin=0 marginwidth="0" marginheight="0" style="background-color:transparent;">


<table width=100% height=100% cellpadding=0 cellspacing=0 border=0>
        <tr>
              <td>
                   <table align=center>
                          <tr>
                              <td>
                                    <iframe src="iframesource.html" height="400" width="400" allowtransparency="true" name=iframe1 border=0 style="filter: chroma(color=ffffff)"  border="0" frameborder="0"></iframe>
                              </td>
                               <td>
                                     <iframe src="iframesource2.html" height="400" width="400" allowtransparency="true" name=iframe2 border=0 style="filter: chroma(color=ffffff)"  border="0" frameborder="0"></iframe>
                               </td>
                         </tr>
                   </table>
              </td>
        </tr>
</table>



</body>
</html>

---------------------------------------------
iframe source
------------------------------------------------
<html>
<head>
<title>iframe document</title>
</head>
<body bgcolor="#FFFFFF" style="filter: chroma(color=ffffff)">

content2


</body>
</html>


----------------------------------------------------------
setup the wallpaper
----------------------------------------------------------

1. right click on the desktop
2. click "propertie"s
3. select the "desktop" tab
4. set the background to none
5. click "apply"
6. click "customize desktop"
7. select the "web" tab
8. click "new"
9. "browse" for your file
10. click "ok"
11. do not check "Lock desktop items"
12. click "ok" for the customization porperties
13. click "ok/apply" for the desktop properties

At this point your html document will appear in a small box on your desktop then you need to:
1. move your mouse over the top border of the html box
2. a menu bar will appear, click the down arrow on the left side
3. a drop down menu will appear, click "Cover desktop"


That's it...

Finally. Sorry it took so long.
0
dsynCommented:
and with some dhtml you could create draggable windows with transparent backgrounds instead of iframes.
0
Gene KlamerusTechnical ArchitectAuthor Commented:
I didn't know the trick about "cover desktop".  With that, and an image in the background, I should be pretty much there.

What the point in the iframe?  Why not just put the image as the background image of the <body>?
0
seanpowellCommented:
This question is taking some bizarre turns!

If the question is can I have a web page cover my "entire" desktop? Absolutely.
If the question is can I have a transparent background within the browser canvas? Then no.

If you're happy with having the full desktop as a web page - then you don't need transparency, iframes, or any other scripting. As has been pointed out - just maximiaze the desktop browser.
0
dsynCommented:
The iframes are there to teach you about transparency. If you want to take your content deeper than just one page you'll want to use either transparent layers,divs, or iframes. By using them you wont have to create a whole bunch of pages with code already written in the original page..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dsynCommented:
Hey thanks for the good score! This was my first, so thanks for baring with me.Let me know if you need more help with this. It was fun
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.