By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,765 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,765 IT Pros & Developers. It's quick & easy.

fade color from dark to light of the same color?

P: 4
How do I for instance, fade the background color from dark gold at the top of the page to a light gold, by the time it gets to the bottom of the page?
May 2 '07 #1
Share this Question
Share on Google+
3 Replies


drhowarddrfine
Expert 5K+
P: 7,435
With javascript so you need to ask over there.
May 2 '07 #2

iam_clint
Expert 100+
P: 1,208
CSS
Expand|Select|Wrap|Line Numbers
  1. body {
  2.    filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#B09900',EndColorStr='#FFF192');
  3. }
  4.  
this hack only works for IE only, the only other way todo this is with an image.. can't be accomplished via js
May 2 '07 #3

drhowarddrfine
Expert 5K+
P: 7,435
Ack! Again I misread the question. (I thought this was a question of dynamically fading/lightening the color)

Do not use filters. They are not standard and only work in IE and, sometimes, Safari.

Instead, use CSS gradients. You can Google for them while I piece together something for you. Here's the common method to get you started. Scroll to gradients. Or Google for "css gradients" to get a whole pile of examples.
May 2 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.