Hi I want to use gradient color as my page background how do I apply css to get gradient background?
is this working in opera??
kc rajput
2010-06-15 13:03:34
A:
if you want your site to be compatible with all browsers, you can use this :
background-image: url(someurl.gif); background-repeat: repeat-x;
the someurl.gif image should contain the gradient that you want. Have it as a very small piece of image and you can extend it with repeat-x or repeat-y. whichever you prefer.
1s2a3n4j5e6e7v
2010-06-15 12:05:11
+2
A:
css 3 supports gradients but this wont be supported by all browsers (eg IE6). Have a look at this link:
But you could do this, which i think is pretty similar to the previous answer:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
padding:0px;
margin:0px;
}
div#bg {
background: url(http://www.khiba.com/PSP/FALL01/Testgrad.jpg) repeat-x;
height:600px;
}
</style>
</head>
<body>
<div id="bg">
</div>
</body>
</html>
Hope that helps!
Ryano
2010-06-15 15:04:30