Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 518
  • Last Modified:

Background Gradient

How could I go about making a gradient background for my webpage? I would like it to start off with the colour #989489 and end with #C7C4BB. Does anyone know how to simulate one that would fill the whole page?
0
momonja
Asked:
momonja
  • 2
  • 2
  • 2
  • +3
1 Solution
 
thirdCommented:
an image can easily do that. create a 1 pixel width image (the height should depend on the screen size you want) then set it as horizontally repeating (repeat-x) background image of your page.
0
 
kollegovCommented:
This is IE only solution...
What you are asking for is impossible to do in other browsers unless you do tiled gradient image

<style>
  .bg {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:#989489;
    filter: alpha(OPACITY=100,FINISHOPACITY=0,STARTY=0,STYLE=1,STARTX=0,FINISHX=0 );
    z-Index:1;
  }
  .content {
    position:absolute;
    top:0;
    left:0;
    z-Index:10;
  }
</style>


<body bgcolor="#C7C4BB">
<div class="bg"></div>

<div class="content">
  Put page content here  
</div>


</body>
0
 
pmsyyzCommented:
IE only solutions suck and keep your CSS from validating.

Currently, a one pixel tall, very wide background image is your only option.

In a few years you can set your background to be an SVG image to get your desired effect, since SVG support gradients.
http://www.w3.org/TR/SVG11/pservers.html#Gradients
Example: http://www.w3.org/TR/SVG11/images/pservers/lingrad01.svg
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
momonjaAuthor Commented:
isn't there any better way...?
0
 
thirdCommented:
if you want to support x-browser then my suggestion which is a gradient image is your only choice.
0
 
jwentingCommented:
Gradient image is the only crossbrowser solution as long as IE is the only browser that is (almost) fully CSS2 compliant.
0
 
momonjaAuthor Commented:
oh well... thanks i guess...
0
 
moduloCommented:
Dear expert(s),

A request has been made to close this Q in CS:
http://www.experts-exchange.com/Community_Support/Q_20603255.html

Without a response in 72 hrs, a moderator will finalize this question by:

 - Saving this Q as a PAQ and refunding the points to the questionner

When you agree or disagree, please add a comment here.

Thank you.

modulo

Community Support Moderator
Experts Exchange
0
 
moduloCommented:
Saving this Q as a PAQ and refunding the 40 points to the questionner

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now