Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

73 users online



javascript gradients in a div

javascript gradients in a div

Currently viewing this thread: 1 (0 members and 1 guests)


the_jamester

the_jamester

Neverside Newbie
Status: Offline!

javascript gradients in a div

This is a question aimed at those guys who are good with the javascript.

Yeah, basically I want to use a vertical #eee to a slightly dark red fade behind a few divs on a site I'm building.

I don't want to use a tall 1 pixel repeated image, because the length of the divs may change based on how much text is in the said div. I also want to be able to use this gradient for the background. Or would it be possible to do a red at around 20% from the top, #eee in the middle, and then red again at the bottom 20%? That's really what I'm looking for.

If this is possible, which I think it is, please let me know.

This may be taking it a bit too far, but have have seen something close . Is there a script that could basically put the opposite gradient on the text in the said div? Thus making the text easier to read because of the contrast in color.

Thanks!

sparky

sparky

I need a haircut
Status: Offline!

I have a CSS solution.

check out www.alistapart.com

they have a gradient in the background (as an image) stuck to the bottom of the page, and the top color set as the background-color of the page. this way it fades in and looks ok on any resolution or size.

___________________

Jon Culver Chia Pets

schmeg007

schmeg007

Status: Offline!

www.tizag.com - does a simple horizontal repeat of a tiny gradient image.

If the color is not going to be dynamic then I suggest just making a gradient in photoshop and using CSS Backgrounds to repeat it.

___________________

"Don't live your life by other people's quotes. Figure out life for yourself." ~Sum Wize Guy
CSS Tutorials
HTML Tutorials
Web Host Guide - Stuff you should know before choosing a web host.

meteora

meteora

Status: Offline!

or use an IE opacity filter

___________________

http://www.cowfarm.com/sig.jpg

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.018 seconds.