It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

Changing transparency on a div of already existing image

Changing transparency on a div of already existing image

Postby Joy on Fri Jan 11, 2008 4:26 pm

I'd like to change the tint/transparency/shade of the already existing background image but only on the background of the existing div. Is this possible? There's text in the div that would be easier to read if it was a different tint, but I don't want to change the color entirely. Help!
Joy
 
Posts: 20
Joined: Sat Dec 29, 2007 8:06 pm

Postby leonard on Fri Jan 11, 2008 5:42 pm

Yeah, transparency is tricky.

I encountered the same problem working on my wedding website.

What I did to solve the problem was to make two div-layers.
One with the normal content (without transparency) and an additional div-layer containing the transparent background which was (using javascript) placed exactly over the real div-layer.

But maybe you could also try putting your div tag into a table (containing one cell) with a transparent background.

cheers!
- leonard
:%s/^M//
There are 10 kinds of people:
Those who understand binary and those who don't.
User avatar
leonard
100+ Club
 
Posts: 147
Joined: Tue Dec 18, 2007 7:11 am
Location: Switzerland

Postby dflynn on Fri Jan 11, 2008 6:59 pm

if the background is relatively solid why not just colour the background of the div so it looks ike you made it transparent.

or alter the background in photoshop to allow you to do what it is you need
User avatar
dflynn
500+ Club
 
Posts: 860
Joined: Wed Oct 03, 2007 9:06 pm
Location: Guelph, Canada


Who is online

Users browsing this forum: No registered users and 0 guests