| | |||||
| ||||||||
| 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. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Aug 2005 Location: East Yorkshire, England
Posts: 2,689
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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> |
| |
| | #2 (permalink) |
![]() Join Date: Jul 2006
Posts: 4,609
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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.
__________________ juegosjuegos Your Hotel in Austria Matratzen Domain Acquisition | Store all your favorite links! | Web Proxies Proxy List | Bookmarks | Creative Enquiry | Web Proxy List |
| |
| | THREAD STARTER #3 (permalink) |
| Senior Member Join Date: Aug 2005 Location: East Yorkshire, England
Posts: 2,689
![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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 |
| |
| | #4 (permalink) |
![]() Join Date: Jul 2006
Posts: 4,609
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | I have just installed FF2 and working fine. No problem. Great coding.
__________________ juegosjuegos Your Hotel in Austria Matratzen Domain Acquisition | Store all your favorite links! | Web Proxies Proxy List | Bookmarks | Creative Enquiry | Web Proxy List |
| |
| | #5 (permalink) |
![]() Join Date: Jul 2006
Posts: 4,609
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | working on ie7 also...
__________________ juegosjuegos Your Hotel in Austria Matratzen Domain Acquisition | Store all your favorite links! | Web Proxies Proxy List | Bookmarks | Creative Enquiry | Web Proxy List |
| |
| | #7 (permalink) |
| First Time Poster! Join Date: Dec 2006
Posts: 1
![]() | 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. |
| |
| | #8 (permalink) |
| NamePros Regular Join Date: May 2005 Location: England
Posts: 390
![]() ![]() ![]() | Looks great on FF2 Rep+
__________________ -Beaver6813.com - Web Developer Extraordinaire! |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |