views:

135

answers:

1

Hi,

I've used JQuery in the past to fade divs in and out successfully. However, I have encountered a situation I can't quite wrap my head around:

I am coding a site for a designer who has based the formatting of all the elements on a grid pattern he's created. As he wants the pattern elements to be the same size independent of the browser window, I think I can only do this via a repeating background tiled image in CSS.

Now he wants the background pattern (only) to come in dark and fade to very light, while not effecting any of the other elements.

Am I right in thinking it's impossible to call a tiled background pattern using a CSS selector?

Does anyone have any suggestions of a workaround to this problem?

+1  A: 

If you have an absolute positioned div, with everything else on top of it, you can fade that div in and out all you want.

You can also try placing with opacity filters in CSS to fade it in an out, not quite the same thing but a similar concept. You'll have to use a few different methods for different browsers.

Kerry
So, it sounds like you're saying to use z-positioning to create some kind of image overlay to fade. That was kind of what I was thinking as a last resort. A bit of smoke and mirrors... and make it big enough that it will fit any screen size (with the overflow hidden). Unless I'm totally off base.I'll look into the opacity filters - thanks for that idea. If it works I'll give due credit.
heathwaller
They were 2 different ideas, the first one, yes on the z-index, though absolute positioning sits on top of pretty much everything else. The second suggestion can be applied anywhere
Kerry