• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

css gradiant div

Greetings - is there a way to get the background of a div to display as a gradiant without using an image?  If so how?  I've seen some css workaround from back in 2005, but surely there's a more backed in method to do this in CSS these days?

THanks in advance.
0
crmsharepoint
Asked:
crmsharepoint
3 Solutions
 
FDMilwaukeeCommented:
the answer for all practical purposes is yes & no.  Does that help? j/k  And just out of curiosity what advantage would you hope to gain over using an image.  Using the image does not slow performance.  

It is possible to do with extensive coding, but it would hardly be worth it, and you would not have cross browser compatibility.

Most of the links provided are browser specific.
 
Here's some links you may find interesting:
http://www.sitepoint.com/blogs/2008/04/25/css-gradients-transforms-animations-and-masks/#
http://www.designdetector.com/2005/09/css-gradients-demo.php

Here is a another EE post regarding the same question, and giving more or less the same answer I am.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/CSS/Q_22665248.html

Hope that helps
FDM
0
 
qwerty021600Commented:
try this but it'll work only in IE
div
{
    filter :   progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=white,endColorStr=#B7D6E4);
      height: 100%;
}
0
 
s8webCommented:
There is no css2 support for this, but if you are okay with a little js, I can vouch that this works well http://slayeroffice.com/code/gradient/

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now