[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

CSS Gradient Background with run-time variable primary color?

Asked by Jahelka in Web Images, Adobe Illustrator, Cascading Style Sheets (CSS)

Tags: background-image gradient fade overlay

You see it everywhere on the web...  Table headers or page headers using some type of gradient or fade as the background to the header...  Just look at this page that you are looking at right now (I'm using the "Expert" skin)!  I have Illustrator CS2 and it is easy enough to create a gradient image that can be used for a background.

I want to know if there is some way to create an overlay image that uses transparency that would work with ANY color background.  I am a coder, not a designer or graphic artist or anything like that.  I figure there has to be some way to create this image such that I can change the background color (in CSS) to whatever I want, and let the same background image create the appearance of a gradient with that color.

I was mildly successful at making this happen.  I just did a a gradient from white to black, set the opacity to 50%, and saved it as a PNG24.  It kinda worked, but the "white" part at the top washed out the background color that it was on top of and it didn't really look right.  For the non-techie graphic artist like me, I think what I wanted is that instead of using white as one of the colors in the gradient, I wanted to use transparent.  But I couldn't find a way to do that (and that might not be possible?).

Here is an example CSS of what I was thinking I could make work.  The idea here is that you could (programatically) change the background color of the gradient as the page is served, rather than having to create a whole bunch of different images with the color you wanted.  My only other concern with this approach is how to handle varying heights of the actual containing block and a fixed image size, but first things first!  Is something like this possible or just a pipe dream?
1:
2:
3:
4:
.gradient {
   background-color : #FF0000;
   background-image : url('gradient.png');
}
[+][-]08/12/09 12:00 PM, ID: 25081682Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/12/09 12:02 PM, ID: 25081707Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/12/09 12:09 PM, ID: 25081774Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Web Images, Adobe Illustrator, Cascading Style Sheets (CSS)
Tags: background-image gradient fade overlay
Sign Up Now!
Solution Provided By: statler01
Participating Experts: 1
Solution Grade: A
 
[+][-]08/12/09 12:13 PM, ID: 25081807Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/12/09 12:15 PM, ID: 25081834Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/12/09 12:24 PM, ID: 25081927Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/12/09 01:23 PM, ID: 25082510Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/12/09 01:56 PM, ID: 25082890Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/12/09 02:09 PM, ID: 25083054Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/12/09 02:14 PM, ID: 25083106Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/12/09 02:22 PM, ID: 25083178Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/12/09 02:38 PM, ID: 25083320Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625