views:

213

answers:

1

I folks. This might be more of a design question but I thought I'd give it a whirl in case someone had some masterful CSS techniques I could use. If not, I'll brace myself for the onslaught of down-voting and nay saying!

You can see the logo holder here has a background image with a nice gradient to the right, and is obviously semi-transparent. My client is looking for a gradient at the top and right side. Any ideas on how I can accomplish this?

alt text

Thanks in advance.

A: 

The most obvious solution would be to use a partially-transparent image as the background-image for the container-div.

#container_div {background: transparent url(path/to/image.png) bottom right no-repeat; }
David Thomas
You see the problem I'm facing though right? on the left at the top it's not a big deal to fade upward. There are a few ways you can tackle that. But as you get closer to the right, blending it up AND right gets tricky. CSS asside, I don't even know how to accomplish this from a design standpoint.
jeerose
Um, no; I don't think I do. From your comment I'm thinking that you want a gradient that runs from the bottom right corner? Just create an image with alpha-channel transparency and position it with css. Am I missing something? This doesn't *seem* hard... =/
David Thomas
@jeerose: Well from the graphics standpoint youre going to have to make a an opacity mask on the left->right fade itself. thats actually pretty easy to accomplish in Fireworks, Photoshop or Illustrator. Now it looks to me like this thing can be a static width and also possibly a static height so im not sure what is giving you problems... Does adding that gradient forbid a background-repeat in a direction you need or something?
prodigitalson
It's pretty easy in the GIMP, too, for what it's worth.
David Thomas
@prodigistalson, I don't know why I didn't think of that before but your "opacity mask" triggered it for me. I applied a gradient mask to the existing fade from top to bottom. Worked like a charm. Thank-you!
jeerose