Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Semi-transparent piece of text or gfx 1

Status
Not open for further replies.

PerD

Programmer
May 4, 2000
12
SE
Hi

I'm a beginner at this with DHTML etc.
I would like to know if I can make a bit of my webpage semi-transparent?
An example would be helpful :)


 
This will work in IE. You must have DirectX installed. It should work with just about any major tag (img, h, table, etc)...
Code:
<html>
<head>
<style type=&quot;text/css&quot;>
 .Transparent{
  filter:Alpha(Opacity=50);
 }
</style>
<body background=&quot;file:////C:\WINDOWS\WEB\Wallpaper\Water Color.jpg&quot;>
<table bgcolor=&quot;#0000ff&quot; width=50% border=1 rules=none frame=box class=&quot;Transparent&quot; style=&quot;font-family:'Verdana';color:'#ffffff'&quot;>
 <tr><td>This is a test</td></tr>
 <tr><td>This is a test</td></tr>
 <tr><td>This is a test</td></tr>
 <tr><td>This is a test</td></tr>
</table>
</body>
</html>
Hope it helps,

Rob
robschultz@yahoo.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

&quot;Focus on the solution to the problem,

not the obstacles in the way.&quot;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
I can not seem to get this to work, As i have been looking for a simmilar effect. The table just comes in as normal.

theEclipse
eclipse_web@hotmail.com
robacarp.webjump.com
**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
I dev'd that on IE5.5/Win2K SP1. You have to have DirectX installed (and functioning). Did you change the background image to something that exists on your hard drive?

Later,

Rob
robschultz@yahoo.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

&quot;Focus on the solution to the problem,

not the obstacles in the way.&quot;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Thanks a lot, this was very helpful.

I can tell you that it's working in IE5.0/Win2K SP1 too.



 
Rob-

I am using win98se with ie 5.0 (not 5.5), and I know that I have direct x installed on my computer. oh well :-|

theEclipse
eclipse_web@hotmail.com
robacarp.webjump.com
**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Eclipse,

It should work. Do you have a background bitmap? If you don't it will look normal. What version of DX do you have (I'm assuming at least 6 with SE). If it still doesn't work then try upgrading to 5.5 (you should anyway) and let me know what happens. I've had transparency effects work with 5.0 before so I'm not sure what the problem is.

Later,

Rob
robschultz@yahoo.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

&quot;Focus on the solution to the problem,

not the obstacles in the way.&quot;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Tom,

That is indeed another way to do it. The downside is that you either have to create x number of different sized gifs or resize them (which really ugly-tizes the transparency). You also must have a different gif for each color of transparency you want. If the target audience has IE5+ then go with the filter otherwise, yes, use the gif technique.

Later,

Rob
robschultz@yahoo.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

&quot;Focus on the solution to the problem,

not the obstacles in the way.&quot;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top