NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Semi-Transparent Table, Opaque Contents

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 10-23-2006, 06:57 AM THREAD STARTER               #1 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Semi-Transparent Table, Opaque Contents


If you want to make a table that is semi-transparent, but with fully opaque contents (example here), use this code. I have tested it with opera 9, firefox 1.5 and ie 6.

Code:
<style>
/*Transparency*/
#one {
	position: relative;
}
#two {
	z-index: 5;
	position: relative;
}
#thr {
	background-color: #FFFFFF;
	border: 1px solid black;
	opacity: 0.5;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
</style>

<comment><div id="one">
<div id="thr"></div>
<div id="two"></comment>
<!--[if IE]><table width="100%" cellspacing="0" cellpadding="10" border="0" align="center" style="filter: alpha (opacity=50);background-color:#FFFFFF;"><![endif]-->
<comment><table width="100%" cellspacing="0" cellpadding="10" border="0" align="center" style="background-color:#FFFFFF;"></comment>
<tr>
<td><!--[if IE]><div style="position:relative;"><![endif]-->
Content Goes Here
</td></tr></table>
<comment></div></div></comment>
Yep, you guessed it, all those non-standard tags are needed by IE (<comment> what kind of stupid idea is that...)
Barrucadu is offline  
Old 10-24-2006, 02:36 PM   #2 (permalink)
 
kleszcz's Avatar
Join Date: Jul 2006
Posts: 4,609
kleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatness
 



Marrow Donor Program Multiple Sclerosis
wow.... it's cool! Rep added. I will implement the code for my website later.

Have you already tested in firefox 2 it is just released? Currently Im going to install new version.
kleszcz is offline  
Old 10-24-2006, 03:47 PM THREAD STARTER               #3 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Havent tested in FF 2, because for some reason it isnt working on my laptop..

But here is an online preview of it:
http://www.white-knights-templar.com
Barrucadu is offline  
Old 10-24-2006, 03:55 PM   #4 (permalink)
 
kleszcz's Avatar
Join Date: Jul 2006
Posts: 4,609
kleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatness
 



Marrow Donor Program Multiple Sclerosis
I have just installed FF2 and working fine. No problem. Great coding.
kleszcz is offline  
Old 11-10-2006, 12:49 AM   #5 (permalink)
 
kleszcz's Avatar
Join Date: Jul 2006
Posts: 4,609
kleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatnesskleszcz Has achieved greatness
 



Marrow Donor Program Multiple Sclerosis
working on ie7 also...
kleszcz is offline  
Old 11-10-2006, 02:59 AM   #6 (permalink)
NamePros Regular
Join Date: May 2006
Posts: 256
3l3ctr1c has a spectacular aura about3l3ctr1c has a spectacular aura about
 



Wow was looking for this thanks, I think we may supply a php if-else for the IE/FF and echo the code accordingly.
Last edited by 3l3ctr1c; 11-10-2006 at 02:59 AM. Reason: Typo
3l3ctr1c is offline  
Old 12-29-2006, 03:18 PM   #7 (permalink)
First Time Poster!
Join Date: Dec 2006
Posts: 1
DocCRP is an unknown quantity at this point
 



Hi, I was wondering if anyone could help me concerning this script...

I tried it out, and it wasn't transparent, but then I noticed the transparency code was under "thr" instead of "two" so I switched those in the section just before the table (so that the order was one, two, thr). This made the table transparent as hoped for, but the content was then transparent as well instead of solid.

I'm not sure what's not working for me, because I go to the TC's example and it shows up perfectly, transparent table and solid content (although, it looks as if the title text may also be transparent, but it's hard to tell, and I don't know if it's intended...but everything else is solid). And the TC has the code in the example exactly as it's posted here (without the switch I made for the "thr" and "two"). So I'm not sure why it doesn't work for me.
????: NamePros.com http://www.namepros.com/code/250080-semi-transparent-table-opaque-contents.html

I'm using Opera 9 to view both the example and my own local file.
DocCRP is offline  
Old 12-30-2006, 01:34 AM   #8 (permalink)
NamePros Regular
 
beaver6813's Avatar
Join Date: May 2005
Location: England
Posts: 390
beaver6813 is a jewel in the roughbeaver6813 is a jewel in the roughbeaver6813 is a jewel in the rough
 




Looks great on FF2 Rep+
beaver6813 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 03:09 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger