Click to See Complete Forum and Search --> : wanted: gradient effect that can be use cross browsers


sirpelidor
10-24-2005, 05:20 PM
hi, was thinking to add some gradient on my site, but the following code only works on IE.


style="filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#FF003399', EndColorStr='#FF6699CC');"


mozilla/firefox seems use something call the: SVG

svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">

<defs>
<linearGradient id="grad1">
<stop offset="0%" stop-color="white"/>
<stop offset="100%" stop-color="black"/>
</linearGradient>
</defs>

<rect x="10" y="10" width="80" height="80" fill="url(#grad1)" stroke="blue"/>

</svg>


is theres any html code that can be use so all browsers can recongize from it?

TIA

p.s: i perfer avoid the use of javascript since not all browsers support javascript the way like anothers do.

tegraphix
10-24-2005, 05:37 PM
It's best to use an image.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
body {
background: url(bkgd.gif) repeat-x 0 0;
}
</style>

</head>

<body>
</body>
</html>