Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Making table backgrounds transparent
Old 08-11-2005, 07:55 PM Making table backgrounds transparent
Experienced Talker

Posts: 43
Trades: 0
Hi everybody!

I'm having slight trouble with a website I'm designing for a customer. The design itself sucks, but it's exactly the way my customer wants it.

The url is: http://www.muskelterapi.net

My problem is...
I have the backgroundpictures in every cell set to 40% transparency using the good old CSS filter-function. The whole TD-code looks like this:
Code:
<td height="63" valign="top" style="background-image:url(header_r4_c1.gif); background-position:center top; background-repeat:no-repeat; filter:alpha(opacity=50);-moz-opacity:50;opacity:50;">
Okay, the code looks good, and the transparency works like a dream, but in this case, it works too good, because all the objects IN the cell gets transparent too. To see it live, check out the URL above.
What can I do to have the background transparent, but keep the items "on top" in normal transparency?


In advance thanks!
What a nice forum by the way Just what I needed!
bkvernst is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-12-2005, 06:43 AM
Skilled Talker

Posts: 92
Trades: 0
hmm what are the items on top? images, text?

Id sort out your CSS stylesheet if I were you. There's a lot of "heirachy" in CSS so styles will be carried on unless redefined by the next element.

Set up everything in a separate stylesheet, table, td, p, img etc etc and you'll be able to specify the background settings for everything separetly which should iron out the problems of things like the background going onto another element. Hope that makes sense!
DaveR is offline
Reply With Quote
View Public Profile
 
Old 08-12-2005, 06:52 AM
King Spam Talker

Posts: 1,186
Location: Manchester, UK
Trades: 0
Doesn't the filter affect the whole td and not just the background image?
gringo is offline
Reply With Quote
View Public Profile Visit gringo's homepage!
 
Old 08-12-2005, 09:09 AM
Experienced Talker

Posts: 43
Trades: 0
Quote:
Originally Posted by gringo
Doesn't the filter affect the whole td and not just the background image?
Unfortunatly, that's what I think too, but I'll try DaveR's solution first, to see if that helps.
Thanks guys!
bkvernst is offline
Reply With Quote
View Public Profile
 
Old 08-12-2005, 09:27 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Don't forget the CSS Filters are an IE Only thing - in firefox, oprea, etc. the TDs render with solid white backgrounds.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 08-12-2005, 12:40 PM
Experienced Talker

Posts: 43
Trades: 0
Yeah, that's right, but I can use "-moz-opacity" to fix the Firefox problem... I think...
bkvernst is offline
Reply With Quote
View Public Profile
 
Old 08-12-2005, 01:18 PM
Experienced Talker

Posts: 43
Trades: 0
Well, hi again...

I did what Dave asked me to, which cleaned up the code alot, but unfortunatly it didn't help me too much. Thanks anyways though

I'm pretty sure Gringo has a good point here, the filter affects the whole TD (including its content), and not just the bg-picture.

Does anyone have another solution to this problem? I need the background picture in the cell to be transparent, but not the items...
Is there a JavaScript I could use to solve my problem? What if I use PNG?

Thanks to those of you that have helped out already. I appreciate it!
bkvernst is offline
Reply With Quote
View Public Profile
 
Old 08-12-2005, 02:28 PM
King Spam Talker

Posts: 1,186
Location: Manchester, UK
Trades: 0
Well.... if you want to tie yourself in knots, why don't you override the style on the td by putting a style on the text to make the text fully opaque?

But this is getting very messy!
gringo is offline
Reply With Quote
View Public Profile Visit gringo's homepage!
 
Old 08-12-2005, 02:38 PM
LGR
Extreme Talker

Posts: 241
Trades: 0
Post deleted.....

Last edited by LGR; 08-12-2005 at 02:41 PM..
LGR is offline
Reply With Quote
View Public Profile
 
Old 08-12-2005, 03:50 PM
Experienced Talker

Posts: 43
Trades: 0
Well, I'll rather deal with the mess, than with this problem

I've done what you said, but it just won't do. Sorry!
I've uploaded the latest code and CSS so if anybody wants to see, go ahead...

http://www.muskelterapi.net/index.htm
http://www.muskelterapi.net/screen.css
bkvernst is offline
Reply With Quote
View Public Profile
 
Old 08-13-2005, 09:19 AM
JohnJ's Avatar
Extreme Talker

Posts: 198
Location: Raleigh, NC
Trades: 0
Aren't we making this a bit more difficult than it need to be?

What if you make your background image a transparent gif - set the opacity to what your design requires and then lay your text over the image....

Would that work??

JohnJ
__________________
JohnJ

Please login or register to view this content. Registration is FREE

WebImages Inc. - Raleigh NC
JohnJ is offline
Reply With Quote
View Public Profile Visit JohnJ's homepage!
 
Old 08-14-2005, 10:16 AM
Experienced Talker

Posts: 43
Trades: 0
Well, GIF would work if it was 100% transparency, but it's 50%, and in GIF it's either everything or nothing. So, GIF and PNG didn't work either, and I'm completly out of suggestions... Using the filter:alpha-style in the TD-tag affects everything in the cell, so I can't use that, unless I'm using it the wrong way.

I'm desperat to make it work!! Heeelp please!!
bkvernst is offline
Reply With Quote
View Public Profile
 
Old 08-15-2005, 04:12 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Try this:
http://youngpup.net/2001/sleight

It's a script that lets you use alpha transparent PNGs in IE6, without affecting it in other browsers.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 08-15-2005, 08:39 AM
Experienced Talker

Posts: 43
Trades: 0
Minaki, if I haven't said it before, I'm saying now; YOU'RE A GENIOUS!
Thanks alot, that worked atleast for IE6. The rest of the browsers will be something I would have to work on...
bkvernst is offline
Reply With Quote
View Public Profile
 
Old 08-15-2005, 03:33 PM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
It should just work on other browsers. The latest versions of Firefox & Oprea support alpha transparent PNGs...
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 08-16-2005, 10:45 AM
Experienced Talker

Posts: 43
Trades: 0
Alright. Then thats not a problem either!
Thanks man!
bkvernst is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Making table backgrounds transparent
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.48067 seconds with 12 queries